Closes #2 Add NimRenameSymbolProject

This commit is contained in:
baabelfish 2016-02-07 20:02:23 +02:00
commit a47fb5e0fa
2 changed files with 8 additions and 2 deletions

View file

@ -26,10 +26,14 @@ function! s:RenameImpl.run(data)
endif
if res.file != expand("%:p")
execute ":e " . expand("%:p")
execute ":e " . res.file
endif
let left = getline(res.line)[0:res.col - 1]
if getline(res.line)[res.col] == '*'
let res.col -= len(res.name)
endif
let left = res.col != 0 ? getline(res.line)[0:res.col - 1] : ""
let right = getline(res.line)[res.col + len(oldName):-1]
call setline(res.line, left . newName . right)
endfor

View file

@ -7,6 +7,8 @@ setlocal nolisp
setlocal autoindent
setlocal indentkeys=!^F,o,O,<:>,0),0],0},=elif
setlocal indentexpr=NimIndent()
setlocal foldmethod=indent
setlocal foldexpr=NimIndent()
function! Down()
return indent(prevnonblank(v:lnum - 1)) - &tabstop