\ " 设置在状态行显示的信息 set foldenable " 开启折叠 "set foldmethod=syntax " 设置语法折叠*** set foldcolumn=0 " 设置折叠区域的宽度 setlocal foldlevel=1 " 设置折叠层数为 "set foldclose=all " 设置为自动关闭折叠 nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')...
** Type dd to delete a whole line. ** Due to the frequency of whole line deletion, the designers of Vi decided it would be easier to simply type two d's to delete a line. 1. Move the cursor to the second lineinthe phrase below. 2. Type dd to delete the line. 3. Now move ...
PressingTabagain scrolls down the menu so you can select something else. Then type a popup-menu key: <Space> -- Accept current match and insert a space. CTRL-Y -- Accept current match and and don't insert a space. <Enter> -- Accept current match and insert a newline. <ESC> or ...
letg:im_select_get_im_cmd=['im-select'] g:ImSelectSetImCmd This variable must be a Funcref who takes the key as argument and returns the whole command line. e.g. letg:ImSelectSetImCmd={key-> ['im-select',key]} g:ImSelectGetImCallback ...
cat -nadds line numbers to its input. You can pipe the current file tocat -nand replace the current buffer with what it prints to stdout. Fortunately this convoluted solution is less than 10 characters in Vim: :%!cat -n Or, if you want just a subselection, visually select the area ...
This command formats the whole buffer or some part of it according to the value of the Vim options shiftwidth and expandtab (see :h 'sw' and :h et respectively). To format a specific part of your document, you can either select it in one of Vim's visual modes (see :h visual-use)...
You can always select text with the mouse (or using V or v and placing the selection in the "* register), and paste it into the command line with Shift + Ctrl + v. Typing Ctrl + r in the command line will cause a prompt for a register name. so typing :CTRL-r* will place the...
" Send the line 23 to floaterm :1,23FloatermSend ... " Send lines between line 1 and line 23 to floaterm :'<,'>FloatermSend ... " Send lines selected to floaterm(visual block selection are supported) :%FloatermSend ... " Send the whole buffer to floaterm ...
You can return to that position with the'and ``` command, unless the line containing that position was changed or deleted. 47. You need to select the whole buffer text in Vim. What is the correct solution? ☑ggVG☐ gg”“+yG ☐ :%y+ ☐ all works You...
mode to select the text to be operated upon. Example that operates on a function name in the current line: onoremap <silent> F :<C-U>normal! 0f(hviw<CR> The CTRL-U (<C-U>) is used to remove the range that Vim may insert. The Normal...