We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neovim built-in substitution command
:%s command substitutes text in the current buffer, e.g substitute the word have by had
:%s
:%s/have/had/g`
The g modifier replaced all occurrences on the same line, omitting g only replaces the first occurrence on each line.
g
c modifier prompts for confirmation of each replace occurrence.
Use visual select to replace all of the 32 arguments to functions by 100 without replacing 32 in the declarations
let _ = 32; let _ = 32; let _ = 32;
let x = foo(32); let y = bar(32); let z = zoo(32); let a = quux(32); let b = tronfibulate(32);
Select all the lines starting from let x = … to let b = … and press :
:
enter the substitute command to scope it to that selection;
% means the whole file
:'<,'>, are visual marks.
Using visual select the substitute command
:'<,'>s/32/100/g
the replacement was limited to the portion of text selected. That works in visual, line and block visual modes
:help s_flags for more information about the substitute flags.
:help s_flags
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Neovim built-in substitution command
:%s
command substitutes text in the current buffer, e.g substitute the word have by hadThe
g
modifier replaced all occurrences on the same line, omitting g only replaces the first occurrence on each line.c modifier prompts for confirmation of each replace occurrence.
Use visual select to replace all of the 32 arguments to functions by 100 without replacing 32 in the declarations
let _ = 32;
let _ = 32;
let _ = 32;
let x = foo(32);
let y = bar(32);
let z = zoo(32);
let a = quux(32);
let b = tronfibulate(32);
Select all the lines starting from let x = … to let b = … and press
:
enter the substitute command to scope it to that selection;
% means the whole file
:'<,'>, are visual marks.
Using visual select the substitute command
the replacement was limited to the portion of text selected. That works in visual, line and block visual modes
:help s_flags
for more information about the substitute flags.The text was updated successfully, but these errors were encountered: