After Installing Debian, we found that its built-in VI has problems: 1) syntax highlighting is not supported. 2) the deletion of the Backspace key is not supported. the VI in Debian is VIM-TINY. The program itself does not support syntax highlighting and Backspace deletion. You can solve this problem by using the following methods :...
After Installing Debian, we found that its built-in VI has the following problems:
1) syntax highlighting is not supported. 2) deletion of the Backspace key is not supported. the VI in Debian is VIM-TINY. The program itself does not support syntax highlighting and Backspace deletion. You can use the following solutions: 1) reinstall other versions of VI apt-get install vim-runtime ctags; 2) configure ~ /. Vimrc www.2cto.com add common configuration options for syntax onVI --------------------- set numberset showbench set incsearchset expandtabset showdeskset history = 400 set autoreadset ffs = unix, mac, dosset hlsearchset character = 2 set wrapset aiset siset cindentset termencoding = unixset tabstop = 2 set character showmatchset fileencodings = UTF-8, gb2312, 18030, gbkset fileformats = unixset character onset preset previewwindow Set showfulltagset cursorlineset rfound "set mouse = a" Close the error bellsset vb t_vb = set nowrapscan "When open a file, it will jump to the last cursor positionif has (" autocmd ") autocmd BufReadPost */if line ("'/")> 0 & line ("'/" ") <= line (" $ ") |/exe" normal! G'/"" |/endifendif "For ctagsset tags = tags; set autochdir "For taglistlet Tlist_Show_One_File = 1let Tlist_Exit_OnlyWindow = 1let Tlist_Auto_Open = 1 set updatetime = 100" For auto complete '('and' {'ino (() : Let leavechar = ")" Iino {{} : Let leavechar = "}" Iino ''' : Let leavechar = "'" Iino """ : Let leavechar = '"' Iimap : Exec "normal f". leavechar A www.2cto.com "For comment in C program/**/set comments = s1:/*, mb: *, ex0: /VI most common operations --------------- I enter the editing status, you can insert content at the cursor o insert blank lines under the current row and enter the editing status O insert blank lines above the current row and enter the editing status D delete all content after the cursor of the current row dd delete the current row gg jump to the top of the file G jump to the bottom of the file 0 move to the beginning of the line $ move to the end of the row x delete CTRL + u turn up CTRL + d. flip down the page. yw: Copy the word where the cursor is located. yy: copy the current row. p: paste it to the cursor. P: paste it before the cursor. # search for words or characters that are the same as the current cursor and highlight/search for strings: sp open another file in the column sharding mode CTRL + ww jump between multiple files opened in the column sharding mode: num jump to the row num of the text: g/str1/s // str2/replace all str1: x in the text with str2, save and exit : Q! Do not save and exit the column from Wei
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service