The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 17: | Line 17: | ||
<pre> |
<pre> |
||
set autochdir |
set autochdir |
||
− | map |
+ | map <Tab> <C-W>W:cd %:p:h<CR>:<CR> |
</pre> |
</pre> |
||
Line 30: | Line 30: | ||
---- |
---- |
||
− | Mapping <S-Tab |
+ | Mapping <S-Tab> to wincmd p is useful also. |
---- |
---- |
||
− | Here's a function to overload the |
+ | Here's a function to overload the <tab> , <c-i> functionality to first go forward in the jump list, and if there is nowhere to go, it will move to the next window: |
<pre> |
<pre> |
||
Line 40: | Line 40: | ||
let c = col(".") |
let c = col(".") |
||
let b = bufnr("%") |
let b = bufnr("%") |
||
− | exe "normal! \ |
+ | exe "normal! \<esc>\<tab>" |
− | if l == line(".") && c == col(".") && b == bufnr("%") |
+ | if l == line(".") && c == col(".") && b == bufnr("%") |
− | call feedkeys( "\ |
+ | call feedkeys( "\<c-w>\<c-w>", "t" ) |
endif |
endif |
||
endfunction |
endfunction |
||
− | nnoremap |
+ | nnoremap <silent> <tab> :call Tab_jump_or_win_move()<CR> |
</pre> |
</pre> |
||