JaredVogt / vimrc

CONFIG: my vimrc
0 stars 0 forks source link

"bar" shortcut needs to be cleaned up... #25

Closed JaredVogt closed 8 years ago

JaredVogt commented 8 years ago

:! more ~/.vimrc | grep '<L>' | sed -e "s/^.*<L>\(.*\)/\1/" is grabbing \(.*\)/\1/" from its own line ;-). Regex needs to exclude this line...

Also, be nice to hide the command - adding silent to the beginning nnoremap <Leader>bar silent :! more ~/.vimrc \| grep '<L>' \| sed -e "s/^.*<L>\(.*\)/\1/"<cr> doesn't work.

oh, lastly, it would be cool if descrips were all aligned...

JaredVogt commented 8 years ago

fixed! final line nnoremap <Leader>bar :! more ~/.vimrc \| grep '^" <L>' \| sed -e 's/^.*<L>\(.*\)/\1/'<cr>

key was adding ^ to grep statement - since that isn't literal and instead matches beginning of line - so it didn't scoop up the definition