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

New answers tagged


Doing getchar(1) in loop is problematic https://github.com/equalsraf/neovim-qt/issues/605 I really suggest you to look at cli.py of leaderF for an implementation.


I got my answer from here: Using command line history in vim Here is a summary to execute your command of choice from command history: q: (opens the command history window) use vim browsing keys to go to the command you want to execute. Alternately :n where n is line number of the command to execute, will place you on the line. CR -> (Carriage return) ...


What happens here is, that the bufdo and argdo command iterate over all buffers themselves. However without writing your changes, vim will refuse to load the next buffer, unless the 'hidden' option is set (which it is not by default) or the argument to the buf/arg-doc comment does write the change itself. So this will work: ex -s -c'bufdo! %s/\s\+$//e|w' -...


Does Ex mode have any practical use? Probably not. However, while entering Ex mode isn't really useful, learning Ex commands still is useful, particularly because you use ex editing commands with :g/ global commands to operate on matching lines.

Top 50 recent answers are included