Skip to content

Instantly share code, notes, and snippets.

@rramsden
Created December 21, 2012 20:31
Show Gist options
  • Save rramsden/4355601 to your computer and use it in GitHub Desktop.
Save rramsden/4355601 to your computer and use it in GitHub Desktop.
nnoremap <buffer> <localleader>s :rightbelow vsplit<CR>:execute 'normal! /^' . expand('<cword>') . "\<cr>"<cr>:nohlsearch<cr>
@rramsden
Copy link
Author

FIXED: for some reason :execute doesn't like the single/double quote concatenation of strings.. will have to investigate further...

Here's the solution:

nnoremap s :rightbelow vsplit/^:nohlsearch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment