New answers tagged


If your terminal has support, you can simply press End. Otherwise, use CtrlO to get into normal mode for a single command only. So Ctrl-O and then $ (or A) will do the trick. In principle, you can remap Ctrl-E to do Ctrl-O $ (like inoremap <c-e> <c-o>$), but :h i_ctrl-e is sometimes useful in Vim on its own.


Since the bulk of the action is happening on external commands here, using a shell script is probably most appropriate in this particular case. If you do want to execute this inside Vim, then using the system() function is a great way to execute an external command and get the result into a string. (You can then use trim() to remove the trailing newline. ...


There are two ways to approach this. Go heavy on the Vim or do what a rational person would do in the real world: lean heavily on the shell and let it do all the work as that's its strength. Though this is Vi/Vim SE I'm going to be contrarian and show the practical solution. ;) Let's say you use Bash and you want to run exif on all PNG files in a certain ...


_ is a linewise motion operator (:h linewise), its primary purpose is to move your cursor to <count> - 1 lines below your current position. For example: 5_ will move your cursor 4 lines down The motion to the beginning of the line is just a side effect of that move. So when you type d_, the delete operation is applied from the current line to 0 lines ...

Top 50 recent answers are included