1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

Updated plugins. Switched to Ack as standard search tool (much better than grep/vimgrep)

This commit is contained in:
amix
2014-02-07 10:41:15 +00:00
parent e62adb8084
commit 8265dca5d5
76 changed files with 3855 additions and 143 deletions

View File

@ -14,6 +14,7 @@ additional contributions from:
* [bpugh](https://github.com/bpugh)
* [bruno-](https://github.com/bruno-)
* [darkwise](https://github.com/darkwise)
* [fish-face](https://github.com/fish-face)
* [henrik](https://github.com/henrik)
* [holizz](https://github.com/holizz)
* [honza](https://github.com/honza)

View File

@ -22,6 +22,8 @@ dependencies. SnipMate depends on [vim-addon-mw-utils][mw-utils] and
[tlib][tlib]. Since SnipMate does not ship with any snippets, we suggest
looking at the [vim-snippets][vim-snippets] repository.
* Using [VAM][vam], add `vim-snippets` to the list of packages to be installed.
* Using [Pathogen][pathogen], run the following commands:
% cd ~/.vim/bundle
@ -32,8 +34,6 @@ looking at the [vim-snippets][vim-snippets] repository.
# Optional:
% git clone https://github.com/honza/vim-snippets.git
* Using [VAM][vam], add `vim-snippets` to the list of packages to be installed.
* Using [Vundle][vundle], add the following to your `vimrc` then run
`:BundleInstall`
@ -46,6 +46,11 @@ looking at the [vim-snippets][vim-snippets] repository.
## Release Notes ##
### Master ###
* Fix bug with mirrors in the first column
* Fix bug with tabs in indents ([#143][143])
### 0.87 - 2014-01-04 ###
* Stop indenting empty lines when expanding snippets
@ -68,3 +73,5 @@ looking at the [vim-snippets][vim-snippets] repository.
[vam]: https://github.com/marcweber/vim-addon-manager
[pathogen]: https://github.com/tpope/vim-pathogen
[vundle]: https://github.com/gmarik/vundle
[143]: https://github.com/garbas/vim-snipmate/issues/143

View File

@ -79,7 +79,7 @@ fun! snipMate#expandSnip(snip, col)
endif
" Insert snippet with proper indentation
let indent = indent(lnum) + 1
let indent = match(line, '\S\|$') + 1
call setline(lnum, line . snipLines[0])
call append(lnum, map(snipLines[1:], "empty(v:val) ? v:val : '" . strpart(line, 0, indent - 1) . "' . v:val"))
@ -375,10 +375,14 @@ function! s:state_proto.update_vars(change)
let i += 1
endif
" Split the line into three parts: the mirror, what's before it, and
" what's after it. Then combine them using the new mirror string.
" Subtract one to go from column index to byte index
let theline = getline(lnum)
" subtract -1 to go from column byte index to string byte index
" subtract another -1 to exclude the col'th element
call setline(lnum, theline[0:(col-2)] . newWord . theline[(col+self.end_col-self.start_col-a:change-1):])
let update = strpart(theline, 0, col - 1)
let update .= newWord
let update .= strpart(theline, col + self.end_col - self.start_col - a:change - 1)
call setline(lnum, update)
endfor
" Reposition the cursor in case a var updates on the same line but before