mirror of
https://github.com/gryf/.vim.git
synced 2025-12-17 19:40:29 +01:00
Use smartcase instead of ignorecase
Correction of the pylint plugin
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
" File: pylint_fn.vim
|
" File: pylint_fn.vim
|
||||||
" Author: Roman 'gryf' Dobosz (gryf73 at gmail.com)
|
" Author: Roman 'gryf' Dobosz (gryf73 at gmail.com)
|
||||||
" Version: 1.0
|
" Version: 1.1
|
||||||
" Last Modified: 2010-09-11
|
" Last Modified: 2015-09-20
|
||||||
"
|
"
|
||||||
" Description: " {{{
|
" Description: " {{{
|
||||||
"
|
"
|
||||||
@@ -96,7 +96,6 @@ class VImPylint(object):
|
|||||||
|
|
||||||
# args
|
# args
|
||||||
args = ['-rn', # display only the messages instead of full report
|
args = ['-rn', # display only the messages instead of full report
|
||||||
'-iy', # Include message's id in output
|
|
||||||
vim.current.buffer.name]
|
vim.current.buffer.name]
|
||||||
|
|
||||||
buf = StringIO() # file-like buffer, instead of stdout
|
buf = StringIO() # file-like buffer, instead of stdout
|
||||||
@@ -120,27 +119,24 @@ class VImPylint(object):
|
|||||||
code_line = {}
|
code_line = {}
|
||||||
error_list = []
|
error_list = []
|
||||||
|
|
||||||
carriage_re = re.compile(r'\s*\^+$')
|
error_re = re.compile(r'^(?P<type>[C,R,W,E,F]):\s+?'
|
||||||
error_re = re.compile(r'^([C,R,W,E,F].+):\s+?([0-9]+):?.*:\s(.*)$')
|
r'(?P<lnum>[0-9]+),\s+?'
|
||||||
|
r'(?P<col>[0-9]+):\s'
|
||||||
|
r'(?P<text>.*)$')
|
||||||
for line in buf:
|
for line in buf:
|
||||||
line = line.rstrip() # remove trailing newline character
|
line = line.rstrip() # remove trailing newline character
|
||||||
|
|
||||||
if error_re.match(line):
|
error_line = error_re.match(line)
|
||||||
if code_line:
|
if error_line:
|
||||||
code_line['bufnr'] = bufnr
|
error_line = error_line.groupdict()
|
||||||
error_list.append(code_line)
|
error_line["bufnr"] = bufnr
|
||||||
code_line = {}
|
|
||||||
|
|
||||||
code_line['type'], code_line['lnum'], code_line['text'] = \
|
error_list.append(error_line)
|
||||||
error_re.match(line).groups()
|
|
||||||
|
|
||||||
if carriage_re.match(line) and code_line:
|
|
||||||
code_line['col'] = carriage_re.match(line).group().find('^') \
|
|
||||||
+ 1
|
|
||||||
vim.command('call setqflist(%s)' % str(error_list))
|
vim.command('call setqflist(%s)' % str(error_list))
|
||||||
if error_list:
|
if error_list:
|
||||||
vim.command('copen')
|
vim.command('copen')
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
let b:did_pylint_init = 1
|
let b:did_pylint_init = 1
|
||||||
endif
|
endif
|
||||||
|
|||||||
12
vimrc
12
vimrc
@@ -59,6 +59,8 @@ NeoBundle "vim-scripts/mako.vim--Torborg"
|
|||||||
NeoBundle "yegappan/grep"
|
NeoBundle "yegappan/grep"
|
||||||
NeoBundle "will133/vim-dirdiff"
|
NeoBundle "will133/vim-dirdiff"
|
||||||
NeoBundle "vim-scripts/JavaScript-Indent"
|
NeoBundle "vim-scripts/JavaScript-Indent"
|
||||||
|
NeoBundle "vim-scripts/vis"
|
||||||
|
|
||||||
|
|
||||||
let g:ctags_statusline=1
|
let g:ctags_statusline=1
|
||||||
let generate_tags=1
|
let generate_tags=1
|
||||||
@@ -75,7 +77,8 @@ set background=dark "Hint Vim that I use dark colorscheme
|
|||||||
set confirm "Ask for confirmation rather then refuse certain commands
|
set confirm "Ask for confirmation rather then refuse certain commands
|
||||||
set cursorline "Turn on current line highlight
|
set cursorline "Turn on current line highlight
|
||||||
set hlsearch "Turn on highlighting search text by default
|
set hlsearch "Turn on highlighting search text by default
|
||||||
set smartcase "Be case aware when needed
|
set ignorecase "Be case insensitive...
|
||||||
|
set smartcase "but be case aware when needed
|
||||||
set expandtab "I want spaces instead of tabs
|
set expandtab "I want spaces instead of tabs
|
||||||
set fileencodings=ucs-bom,utf-8,latin2,default,latin1,default
|
set fileencodings=ucs-bom,utf-8,latin2,default,latin1,default
|
||||||
set fileformats=unix,dos "Type of <EOL> in written files
|
set fileformats=unix,dos "Type of <EOL> in written files
|
||||||
@@ -137,6 +140,10 @@ set noswapfile
|
|||||||
"in case they are needed, store swapfiles in tmp
|
"in case they are needed, store swapfiles in tmp
|
||||||
"set dir=~/tmp/
|
"set dir=~/tmp/
|
||||||
|
|
||||||
|
" store the undo in undodir
|
||||||
|
"set undofile
|
||||||
|
"set undodir=~/.cache
|
||||||
|
|
||||||
" Strip trailing whitespace option
|
" Strip trailing whitespace option
|
||||||
let stripTrailingWhitespace = 1
|
let stripTrailingWhitespace = 1
|
||||||
|
|
||||||
@@ -291,6 +298,9 @@ let g:pythonhelper_updatetime = 1000
|
|||||||
"TagListToo {{{2
|
"TagListToo {{{2
|
||||||
nmap <Leader>t :Tagbar<CR>
|
nmap <Leader>t :Tagbar<CR>
|
||||||
"}}}
|
"}}}
|
||||||
|
"KickAssembler {{{2
|
||||||
|
let g:kickass_path = '/home/gryf/c64/PCTools/Cross-assemblers/KickAssembler/KickAss.jar'
|
||||||
|
"}}}
|
||||||
"}}}
|
"}}}
|
||||||
"KEYS: User defined keyboard shortcuts {{{
|
"KEYS: User defined keyboard shortcuts {{{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user