1
vote
1answer
50 views

dot command in Vim, last change?

The dot command in Vim repeats the "last change", but I am not exactly sure what constitutes the "last change". For example, if I type the sequence: A;{ESC}j. Then a semi-colon is appended to ...
6
votes
6answers
6k 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
80 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
118 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
429 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? ...