We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

2

Use this: alias vv="vim -c 'norm! ^O'" norm execute normal mode command ^O as if you type it. See :help :normal for more information. ^O is one character, you can input it in insert mode by typing <C-V><C-O>. It brings you to last cursor position, which is in the last file you edited. So the alias above is the same as opening vim and press ...


2

This happens because history expansion is performed before alias expansion. You can force history expansion in your alias by using the history command, using command substitution to replace a command that queries the history with its output: alias vv='$(history -p !vim)' but this will not handle filenames correctly if they contain characters that might ...


Only top voted, non community-wiki answers of a minimum length are eligible