Skip to content

Commit 59ff5c7

Browse files
committed
ftplugin: use setlocal and let &l:.
1 parent 4cdc6bf commit 59ff5c7

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
## vim-checkimpcont ##
22

33
Vim plugin for [checkimpcont][cic], a tool that detects possibly misleading
4-
string literal concatenations in Python-2.x sources
4+
string literal concatenations in Python-2.x sources.
55

66

77
## Installation ##
88

99
1. First, please install the Python script [checkimpcont.py][cic].
1010
2. After that, put the Vim plugin script in your `.vim/ftplugin/python`
1111
directory.
12-
3. Alternatively, you can also use [`pathogen`][pathogen] to install the
13-
plugin.
12+
3. Alternatively, you can use [`pathogen`][pathogen] to install the plugin.
1413

1514

1615
## Usage ##

ftplugin/python/checkimpcont.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ function! <SID>CheckImpCont()
2929
cclose
3030
let l:grepformat_save = &grepformat
3131
let l:grepprg_save = &grepprg
32-
set grepformat=%-P[%f],%A%l:%c:\ %t%.%#:\ %m,%-C%s,%-C%p^
33-
set grepprg=(echo\ ['%'];checkimpcont.py\ '%')
32+
setlocal grepformat=%-P[%f],%A%l:%c:\ %t%.%#:\ %m,%-C%s,%-C%p^
33+
setlocal grepprg=(echo\ ['%'];checkimpcont.py\ '%')
3434
if &readonly == 0 | update | endif
3535
silent grep!
36-
let &grepformat = l:grepformat_save
37-
let &grepprg = l:grepprg_save
36+
let &l:grepformat = l:grepformat_save
37+
let &l:grepprg = l:grepprg_save
3838
belowright cwindow
3939
set nolazyredraw
4040
redraw!

0 commit comments

Comments
 (0)