The purpose of content scrolling is to move the content so that we can better watch the content. However, the content and the cursor position remain unchanged! Stage 1: C-F/B/u/D C-E/y prepare a large text file. I just want to browse the text. hjkl
Modify the vim configuration file in Ubuntu to make it easier for CProgramDesignAnother simple method
1. Input Vim ~ in the terminal ~ /. Vimrc press ENTER2. Enter the following content:"Display row number: Set nu
"Tab width: Set Ts = 8
"Auto
1. Nasty indentation
When copying from other places to VIM, sometimes there will be "unlimited" indentation, such as a step, and its impact on readability
Solution:
Gg = g, formatted from the end of the file header
2 automatic comments
There is
[Vim] Vim settings for displaying row numbers, syntax highlighting, and automatic indentation
I have never tried fedora in other Linux versions. Please forgive me! Thank you.
In ubuntu, the vim configuration file is stored in the/etc/Vim directory.
I tried to use the python AutoComplete in vim and setting the environment
In ~ /. Bashrc, then it works in shell. But not works when I opening gvim from a window.
Find it on line and I get some useful information:
When you are
Vim's omnipotent completion for python can be used normally for all module libraries that come with python, but some custom modules do not work. This is
Because the current Vim process needs to find the corresponding module and perform import and
Some students prefer to use spaces for indentation. Therefore, manyCodeThe row capital contains consecutive and repeated spaces, some of which are four or even eight. Uncle can't bear it.
Vim has some options such as retab that can be used to
References:
1. http://www.cnblogs.com/samwei/archive/2011/04/25/2026211.html
1. Grammar highlighting
To support Python syntax in Vim, plug-in python is required. VIM: this plug-in is located under //syntax/by default. If you do not find this
Use Vim to build ide-Highlight
In ~ Create C. Vim under/. Vim/syntax. If this directory does not exist, create it by yourself.
Vim uses this script to read the syntax highlighting rules and edit the c. Vim file as follows:
"========================
Configure the vim shortcut for opera:
Compared to Firefox/chrome, opera does not use Vim plug-ins. Therefore, you can only manually configure the shortcut key to partially achieve functions similar to vimperator and vimium.
The common shortcut keys
1. unindent does not match any outer indentation levelThe reason is that the file contains a mix of tabs and spaces (refer
Http://blog.csdn.net/shell_picker/article/details/6033023)
Solution: Use spaces. Set tabstop and shiftwidth to the same
Vim script. (Transfer)Remember that many ides in the window can annotate the entire code for testing. Restore it after testing. The corresponding functions are also implemented in Linux Vim today.Comment on a single row: ctrl_cComment on multiple
1. ctags
(1)
Http://prdownloads.sourceforge.net/ctags/ctags-5.6.tar.gz
Download ctagssource code ctags-5.6.tar.gz
(2) decompress and install
Assume that the taogle user's directory is in the home directory:
Tar zxvf ctags-5.6.tar.gz
CD ctags-5
Use Vim to write C/C ++ programs (reprinted)Use Vim to write C/C ++ programs
VI is the most common text editor in UNIX. Vim (VI improved) is its enhanced version. Some people often compare Vim with Emacs. Although Vim does not have as many features
Original converted from [http://my.oschina.net/captaintheron/blog/5157? From = RSS]
It is annoying that python is strictly indented, but I use py under Vim in Linux. By default, the tab is as long as eight spaces (in fact, it is still a tab, set
"*************************************** "******************************** * *********** "Set the operating system if has (" Win32 ") | has ("win64") | has ("win32unix") Let G: iswin = 1 else let G: iswin = 0 endif
"**********************************
Stage 1: U c-r [secondary memory: Undo redo] Hey, Tom, my sister deleted important things. What should I do? Solve the problem by u in normal mode! Not enough? 3u 6u 10000u thank you ~ White, u pressed a few more, undo too much ~ Then c-r will be
I,Official Website
Www.vim.org
II,VI Working Mode
Command mode, insert mode, and edit mode.
III,Go to VI
1.Use VI to open a file.
2.Directly go to the specified location.
1)Vi + 20/etc/passwd
2)Vi +/root/etc/passwd
IV,VI Basic Applications
1.INSERT
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