Last active
August 29, 2015 13:56
-
-
Save sedm0784/9133952 to your computer and use it in GitHub Desktop.
Mappings for leaping between sections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An edited version of the code for searching for PlaceHolders (^K) from here: | |
# http://vim.wikia.com/wiki/User:Tlgrok/Form_Feeds_and_Vertical_Tabs | |
function! <SID>FindSection (forward) | |
let l:place_holder = nr2char(12) "form feed | |
let l:flags="W" | |
if (!a:forward) | |
let l:flags.="b" | |
endif | |
let l:match=search(l:place_holder, l:flags) | |
if (!l:match) | |
echo "No more sections in requested direction." | |
return | |
endif | |
endfunction | |
nnoremap <silent> [l :call <SID>FindSection(0)<CR> | |
nnoremap <silent> ]l :call <SID>FindSection(1)<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment