1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-17 11:30:29 +01:00

Use smartcase instead of ignorecase

Correction of the pylint plugin
This commit is contained in:
2015-11-04 18:51:15 +01:00
parent 17463ca807
commit 6b7cbb4c81
2 changed files with 23 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
" File: pylint_fn.vim
" Author: Roman 'gryf' Dobosz (gryf73 at gmail.com)
" Version: 1.0
" Last Modified: 2010-09-11
" Version: 1.1
" Last Modified: 2015-09-20
"
" Description: " {{{
"
@@ -96,7 +96,6 @@ class VImPylint(object):
# args
args = ['-rn', # display only the messages instead of full report
'-iy', # Include message's id in output
vim.current.buffer.name]
buf = StringIO() # file-like buffer, instead of stdout
@@ -120,27 +119,24 @@ class VImPylint(object):
code_line = {}
error_list = []
carriage_re = re.compile(r'\s*\^+$')
error_re = re.compile(r'^([C,R,W,E,F].+):\s+?([0-9]+):?.*:\s(.*)$')
error_re = re.compile(r'^(?P<type>[C,R,W,E,F]):\s+?'
r'(?P<lnum>[0-9]+),\s+?'
r'(?P<col>[0-9]+):\s'
r'(?P<text>.*)$')
for line in buf:
line = line.rstrip() # remove trailing newline character
if error_re.match(line):
if code_line:
code_line['bufnr'] = bufnr
error_list.append(code_line)
code_line = {}
error_line = error_re.match(line)
if error_line:
error_line = error_line.groupdict()
error_line["bufnr"] = bufnr
code_line['type'], code_line['lnum'], code_line['text'] = \
error_re.match(line).groups()
error_list.append(error_line)
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))
if error_list:
vim.command('copen')
EOF
let b:did_pylint_init = 1
endif

12
vimrc
View File

@@ -59,6 +59,8 @@ NeoBundle "vim-scripts/mako.vim--Torborg"
NeoBundle "yegappan/grep"
NeoBundle "will133/vim-dirdiff"
NeoBundle "vim-scripts/JavaScript-Indent"
NeoBundle "vim-scripts/vis"
let g:ctags_statusline=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 cursorline "Turn on current line highlight
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 fileencodings=ucs-bom,utf-8,latin2,default,latin1,default
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
"set dir=~/tmp/
" store the undo in undodir
"set undofile
"set undodir=~/.cache
" Strip trailing whitespace option
let stripTrailingWhitespace = 1
@@ -291,6 +298,9 @@ let g:pythonhelper_updatetime = 1000
"TagListToo {{{2
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 {{{