From 6b7cbb4c8176c00d57e149d90646ca4597967af3 Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 4 Nov 2015 18:51:15 +0100 Subject: [PATCH] Use smartcase instead of ignorecase Correction of the pylint plugin --- ftplugin/python/pylint_fn.vim | 28 ++++++++++++---------------- vimrc | 12 +++++++++++- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ftplugin/python/pylint_fn.vim b/ftplugin/python/pylint_fn.vim index caee63f..6cd4bde 100644 --- a/ftplugin/python/pylint_fn.vim +++ b/ftplugin/python/pylint_fn.vim @@ -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[C,R,W,E,F]):\s+?' + r'(?P[0-9]+),\s+?' + r'(?P[0-9]+):\s' + r'(?P.*)$') 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 diff --git a/vimrc b/vimrc index fa4d4bc..1dae615 100644 --- a/vimrc +++ b/vimrc @@ -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 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 t :Tagbar "}}} +"KickAssembler {{{2 +let g:kickass_path = '/home/gryf/c64/PCTools/Cross-assemblers/KickAssembler/KickAss.jar' +"}}} "}}} "KEYS: User defined keyboard shortcuts {{{