How do I append the same text to the end of several lines?
V select then :norm A text
Selecting lines and running :norm A text appends the same text to the end of every selected line.
2277 results for "@a"
V select then :norm A text
Selecting lines and running :norm A text appends the same text to the end of every selected line.
oil.nvim: edit directory listing like a buffer
oil.
qayy:+1\nif getline('.')==@0|d|else|+1|endif\nq
Record a macro that yanks the current line and compares it with the next.
:'<,'>!sort -u
Select lines, then type ! which auto-expands to :'!.
:g/pattern/p
Use :g/pattern/p to print all matching lines.
:!ls
Use :! followed by any shell command.
qa/pattern<CR>dd@aq
By starting a macro with a search command, the macro becomes conditional — it jumps to the next match before acting, and terminates when no more matches are f
:{line}put {register}
How it works The :put Ex command pastes the contents of a register after a specified line.
:checkhealth {module}
:checkhealth {module} runs the health check only for the specified module, making it much faster than the full :checkhealth which interrogates every registered
command-line #neovim #diagnostics #debugging #plugins #health
:e +/pattern filename
The +{cmd} flag on :edit (and most file-opening commands) runs an Ex command immediately after the file loads.
command-line #command-line #ex-commands #navigation #search #buffers
<C-r>=input('Enter: ')<CR>
By embedding =input('prompt: ') inside a recorded macro, you can pause the macro at any point to ask for user input and insert the result.
:reg {name}
The :reg {name} command displays the current contents of one or more named registers in a formatted listing.
qaI1. <Esc>jq
Start at line 1, record a macro that inserts 1.
S) with vim-surround
With the vim-surround plugin, select text visually and press S) to wrap with parentheses.
:set tabstop?
Append ? to any option name to query its value.
:verbose map <key>
Use :verbose map to see the mapping definition and the file/line where it was set.
:[range]w !{cmd}
The :[range]w !{cmd} command writes a range of lines to the standard input of a shell command, leaving the buffer completely unchanged.
:e +{line} {file}
The :edit command accepts a +{cmd} prefix that executes an Ex command immediately after the file is loaded.
command-line #buffers #ex-commands #navigation #command-line
:[range]luado {lua-expr}
Neovim's :luado command runs a Lua expression on each line of a range, allowing you to transform text using the full power of Lua's string library.
b: w: t: s:
Vimscript variables are prefixed with a one-letter scope identifier followed by a colon.