3
votes
6answers
347 views

How to comment multiple lines at once? [duplicate]

How can I select a bunch of text and comment it all out? Currently I go to the first line, go to insert mode then type # left-arrowdown-arrow and then I repeat that sequence, perhaps saving a few ...
2
votes
1answer
74 views

Expand pattern under cursor to all files matching it

Is there anyway to let VIM expand the glob pattern to all files that match it? e.g when I type *.c, and press some key, it would become a.c b.c
2
votes
2answers
110 views

Vim markers and macros

Is there a way to make a macro operate up to a marker? I know if I do 5@a my macro will operate on 5 lines. Example: set marker with `mc` record a macro with `qa` ... now what? Obviously 'c@a just ...
11
votes
4answers
355 views

Is there a vim shortcut for <name of current file>?

In vim, if I'm working on a Python script, I will commonly type: :! python this_script.py to execute the script. Is there a shortcut for the name of the current file? If not, can I easily make one? ...