is equivalent tov, so you could also do the above with: :v/^\s*"/d The next example shows use of\|("or") to delete all linesexceptthose that contain "error" or "warn" or "fail" (:help pattern): :v/error\|warn\|
:g!/foo/d - Delete all lines not containing the string “foo”. :g/^#/d - Remove all comments from a Bash script. The pattern ^# means each line beginning with #. :g/^$/d - Remove all blank lines. The pattern ^$ matches all empty lines. :g/^\s*$/d - Remove all blank ...
--sortr <SORTBY> This flag enables sorting of results in descending order. -f <PATTERNFILE>..., --file <PATTERNFILE>... Search for patterns from the given file, with one pattern per line. (This option can be provided multiple times.) -g <GLOB>..., --glob <GLOB>... Include or...
vim set nocompatible "behave mswin " Remove menu, scroll bar and tools bar set guioptions-=m set guioptions-=r set guioptions-=T " Command ToggleView let s:view_status = 0 function ToggleView() if s:view_status == 0 set guifont= set lines=53 let s:view_status = 1 elseif s:view...
global具体自行方法是 g/pattern/command :g/abc/p -> 查找并显示出只有abc的行 (only print line with “abc” ) :g/abc/d -> 删除所有有abc的行 (delete all line with “abc”) :v/abc/d -> 这个会把凡是不是行里没有abc的都删掉 (delete all line without “abc”) ...
g:ale_fixers = { \ '*': ['remove_trailinglines','trim_whitespace ], \ 'python': ['autopep8'] \}let g:ale_sethighlights = 0"let g:alefixon_save = 1 "auto Savalet gale_echo_msg_format = '[#%linter%#] %s[%severity%]'let g:ale_sign_column_always = 1 "始终...
('toggle_columns', \ 'mark:indent:icon:filename:type:size:time') nnoremap <silent><buffer><expr> S \ defx#do_action('toggle_sort', 'time') nnoremap <silent><buffer><expr> dD \ defx#do_action('remove') nnoremap <silent><buffer><expr> a \ defx#do_action('rename') nnoremap <...
"In ~/.vim/vimrc, or somewhere similar.letg:ale_fixers={\'*': ['remove_trailing_lines','trim_whitespace'],\'javascript': ['eslint'],\} If you want to automatically fix files when you save them, you need to turn a setting on in vimrc. ...
remove lines containing the word “reader” One to Ten Two pairs of cluster of letters creates word I forgot quotes Applying same text modification in several lines Cool or not? Leave only the numbered lines. Com(m)a Trouble Words in parens Swap values inside brackets A HAPPY NEW YEAR 2014...
endif "" Disable the blinking cursor. set gcr=a:blinkon0 set scrolloff=3 "" Status bar set laststatus=2 "" Use modeline overrides set modeline set modelines=10 set title set titleold="Terminal" set titlestring=%F set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ ...