.. vim: noexpandtab fileencoding=utf-8 nomodified wrap textwidth=270 foldmethod=marker foldmarker={{{,}}} foldcolumn=4 ruler showcmd lcs=tab\:|- list tabstop=8 noexpandtab nosmarttab softtabstop=0 shiftwidth=0 :date: 2023.06.21 04:57:18 :tags: HowTo :authors: Gilhad :summary: vim :title: vim :nice_title: |logo| %title% |logo| %HEADER% vim -------------------------------------------------------------------------------- asdfadsf how in 'vim' editor delete empty lines in visual selection? -------------------------------------------------------------------------------- .. code:: V - select lines :g/^\s*$/d g: Global command that applies the following command to all lines in the selection that match a pattern. /^\s*$/: The pattern to match. In this case, it matches all lines that contain only whitespace characters (spaces, tabs, etc.) or are completely empty. d: The command to execute for each matching line. In this case, it deletes the line. How in vim open file at cursor? -------------------------------------------------------------------------------- .. code:: gf line-continuation -------------------------------------------------------------------------------- .. code:: :h line-continuation :e ~/.vimrc map ,rr :set noexpandtab^M:set nosmarttab^M:set textwidth=270^M,r o:date: 1970.01.01 00:00:00^M \:tags: none^M \:authors: Gilhad^M \:summary: ^[:put %^MkJA^?^?^?^?^M \:title: ^[:put %^MkJA^?^?^?^?^M \:nice_title: \|mix\| %title% \|mix\|^M^M \%HEADER\%^M^M \^[:put %^MkJA^?^?^?^?^M^[80i-^[o^M^MLorem ipsum ...^M^[/:date:^M,. :%s/mix/mix/g