我很想知道,我能 vi回头来,在我最后一次停下3秒钟的时候,我可以 vi。 然后,我可以坐下来,并有一个小小小小.,在我与原来的CTRL+o站在一起时跳出来。
我很想知道,其中一半在我看来是毫无用处的,因此我怎么能这样做?
换言之,我试图使跳跃名单更加敏感。
ps: Netbeans and VS has a similar conduct.
我很想知道,我能 vi回头来,在我最后一次停下3秒钟的时候,我可以 vi。 然后,我可以坐下来,并有一个小小小小.,在我与原来的CTRL+o站在一起时跳出来。
我很想知道,其中一半在我看来是毫无用处的,因此我怎么能这样做?
换言之,我试图使跳跃名单更加敏感。
ps: Netbeans and VS has a similar conduct.
为使现有职位自动列入CursorHold
活动:
:autocmd CursorHold * normal! m
导航为默认<代码><C-o>/<C-i>
。
通常使用<代码>m和的指令跳跃。 例如,您可打上<代码>mx、去除和做某些事情,然后用<代码>x跳回你到哪里
mx
。 每一字母(即ma
,mb
,......mz
。 上案编号(mA
,mB
,...)还将记住档案名称,以便你能够跳跃到档案中。 您可以出于各种目的。
“前背景标记”称为<代码>。 当你跳跃时自动确定,也可人工设定<代码>m。 www.un.org/chinese/sc/presidency.asp <代码>m的指挥系统也增加了跳跃。 <代码>代码>大致相当于Ctrl+O,但无改动。
如果你用背书取代这些指挥中的热带,Vim将跳跃到具体一栏,而不仅仅是线。 在实践中,甲.更容易打上型号,而且往往足够接近。
可在<代码>编码>登记册上打上标记。 关键中点为<代码>m。
I found this in vim s documentation :help jumplist
.
你们可以通过把标识“m”明确添加一个跳跃。
下面的<代码>vimrc设置。 它只在以下几段添加新的跳跃:<代码>CursorHold的触发点,这一段不是第1段)、由<代码>CursorHold设定的最近<代码>m的位置、跳跃或2)跳跃历史中目前选定的地点的位置(例如与<代码>的滚动;C-o>><C-i>。
function! s:reset_jumps() abort
let [line1, line2] = [line(" {"), line(" }")]
let [items, pos] = getjumplist()
let pos = min([pos, len(items) - 1]) " returns length if outside of list
let [prev, curr] = [line(" "), items[pos][ lnum ]]
if (line1 > curr || line2 < curr) && (line1 > prev || line2 < prev)
call feedkeys("m ", n ) " update mark to current position
endif
endfunction
augroup jumplist_setup
au!
au CursorHold * call s:reset_jumps()
augroup END
我也采取了以下不同的常规跳跃行为:
noremap n <Cmd>keepjumps normal! n<CR>
noremap N <Cmd>keepjumps normal! N<CR>
noremap ( <Cmd>keepjumps normal! (<CR>
noremap ) <Cmd>keepjumps normal! )<CR>
noremap { <Cmd>keepjumps normal! {<CR>
noremap } <Cmd>keepjumps normal! }<CR>
Is it possible to update vim plugins automatically?
How can I configure vim to autowrite buffers after switching with alt-tab to another application?
I m writing a lot of python code recently, and i used the tab-to-space mode in vim. I was just wondering how would i unindent in vim without leaving edit mode for example after i finished if...: block....
I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...
How do I delete comments in XML? If the opening and the closing comment tags are on the same line, I use :g/^<!--.*-->$/d to delete the comment. How to delete the comments that are spread ...
I have the following in my .vimrc to highlight lines longer than 80 chars: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ This works quite well. However, the ...
Whenever I start a shell in vim using :sh, it doesn t source my ~/.bashrc file. How can I get it to do this automatically?
I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...