Sunday, May 1, 2011

Re: Path easy-search

> * what's wrong with "n" and "N"
...
> What I have now in the vimrc:
>
> ono m //e<CR>
> xn <script> m //e<SID>SelOff<CR>
> cno <expr> <SID>SelOff &sel=="exclusive" ? "+1" : ""
> " do the right thing after o_//e and .
> no <script> n //<CR><SID>HistDel
> no <script> N ??<CR><SID>HistDel
> sunm n|sunm N
> nn <silent> <SID>HistDel :call<sid>HistDel(0)<CR>
> vn <silent> <SID>HistDel :<C-U>call<sid>HistDel(1)<CR>
> ino <silent> <SID>HistDel <C-R>=<sid>HistDel(0)<CR>
> func! <sid>HistDel(vmode)
> if a:vmode
> normal! gv
> endif
> call histdel('/', -1)
> return ""
> endfunc

Problem: Folds are not automatically opened any more
Solution: Add a zv command when "search" is in 'foldopen'

no <script> <expr> n "//<CR>".(&fdo=~"search"?"zv":"")."<SID>HistDel"
no <script> <expr> N "??<CR>".(&fdo=~"search"?"zv":"")."<SID>HistDel"

(The rest is unchanged.)

Ben.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment