Skip to content

@trevmex /.vimrc
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
My first VimL function. It removes all matched lines in a file. Woohoo!
" :RL <regexp> will now remove all matched lines in a file
function! RemoveLine(regexp)
exe '%s,^.*' . a:regexp . '.*$\n,,g'
endfunction
command! -nargs=1 RL call RemoveLine(<f-args>)
@robertmeta

:%g/foo/d

will delete all lines containing foo.

But glad you are learning VimL -- cause I don't want to have to write those wonderful plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.