Permalink
Browse files

Change [o and ]o to [f and ]f

This is a better mnemonic and frees up [o and ]o (after a grace period)
for some other ideas I have.  Note that [f and ]f are deprecated
equivalents to gf.
  • Loading branch information...
1 parent 8c53186 commit ac65386a620783ef5dcb729865445f00fba7376f @tpope committed Jan 11, 2013
Showing with 14 additions and 10 deletions.
  1. +1 −1 README.markdown
  2. +4 −4 doc/unimpaired.txt
  3. +9 −5 plugin/unimpaired.vim
View
@@ -17,7 +17,7 @@ There are mappings for encoding and decoding. `[x` and `]x` encode and
decode XML (and HTML). `[u` and `]u` encode and decode URLs. `[y` and
`]y` do C String style escaping. `[Y` and `]Y` encode and decode Base64.
-And in the miscellaneous category, there's `[o` and `]o` to go to the
+And in the miscellaneous category, there's `[f` and `]f` to go to the
next/previous file in the directory, and `[n` and `]n` to jump between
SCM conflict markers.
View
@@ -36,12 +36,12 @@ is "args" and for the "q" commands is "quickfix".
*[T* |:tfirst|
*]T* |:tlast|
- *[o*
-[o Go to the file preceding the current one
+ *[f*
+[f Go to the file preceding the current one
alphabetically in the current file's directory.
- *]o*
-]o Go to the file succeeding the current one
+ *]f*
+]f Go to the file succeeding the current one
alphabetically in the current file's directory.
*[n*
View
@@ -87,11 +87,15 @@ function! s:fnameescape(file) abort
endif
endfunction
-nnoremap <silent> <Plug>unimpairedONext :<C-U>edit <C-R>=<SID>fnameescape(<SID>FileByOffset(v:count1))<CR><CR>
-nnoremap <silent> <Plug>unimpairedOPrevious :<C-U>edit <C-R>=<SID>fnameescape(<SID>FileByOffset(-v:count1))<CR><CR>
-
-nmap ]o <Plug>unimpairedONext
-nmap [o <Plug>unimpairedOPrevious
+nnoremap <silent> <Plug>unimpairedDirectoryNext :<C-U>edit <C-R>=<SID>fnameescape(<SID>FileByOffset(v:count1))<CR><CR>
+nnoremap <silent> <Plug>unimpairedDirectoryPrevious :<C-U>edit <C-R>=<SID>fnameescape(<SID>FileByOffset(-v:count1))<CR><CR>
+
+nmap <Plug>unimpairedONext <Plug>unimpairedDirectoryNext
+nmap <Plug>unimpairedOPrevious <Plug>unimpairedDirectoryPrevious
+nmap ]f <Plug>unimpairedDirectoryNext
+nmap [f <Plug>unimpairedDirectoryPrevious
+nmap ]o <Plug>unimpairedDirectoryNext
+nmap [o <Plug>unimpairedDirectoryPrevious
" }}}1
" Diff {{{1

0 comments on commit ac65386

Please sign in to comment.