2/24/2023 0 Comments Gedit ctags![]() ![]() Let Tlist_Show_One_File = 0 "Enable taglist to display a list of functions of multiple files at the same time, set to 1 when not displayed at the same time> tags of multiple files, showing only the current file Let Tlist_Use_Right_Window = 0 "1 for the window to be displayed on the right, 0 for the window to be displayed on the left Let Tlist_Ctags_Cmd = '/ usr / bin / ctags' "Set the position of ctags "let Tlist_Auto_Open = 1" After starting VIM, automatically open the taglist window "set tags = / home / long / workstation / ganguio / uio-8139d-driver / V7 / tags, / home / long / linux-3.7.3 / drivers / uio / tags Because the> path recorded in the tags file is always relative to the path where the tags file is located, the second setting item is used to change the current directory of vim. The tags file, or if no corresponding target is found, it looks in the parent directory and recurs all the way up. This command makes vim first look for the tags file in the current directory. "The semicolon in the first command is essential. Map :! ctags -R -c ++-kinds = + p -fields = + iaS -extra = + q. "Set the matching mode, the right parenthesis will appear when you enter the parentheses "Use 4 spaces when interleaving between current lines Map : set nonu "Map Ctrl + F5 to not display line numbers Map : set nu "Map F5 to display line numbers, refer to" vim keymap "() The configuration information for my VIMRC file is attached below: (4) Write the appeal command to the configuration file according to individual needsįor example, my personal settings are: syntax on, set ruler, set number, set Smartindent shiftwidth=4 (3) If you do not have write permission, modify the permissions so that we can modify the configuration file Here's how to modify a configuration file: Of course, if not too troublesome, you can open vim every time you enter the command, such as I often used is: set number:set ruler:syntax on:set smartindent command, if the usual in the bottom row mode entered the command directly to the configuration file, You do not have to enter these commands again when you use Vim later.įirst of all, try the VI in the bottom line mode to enter the following command, if not supported, to download a full version of Vim, sudo apt-get install vim-full. Multi-file editing, you may need to edit multiple files while writing a program, in which case you need to set the following : Set list//Display tab, with ^ symbol to show tab position : Set ruler//display cursor information (lower right corner) Display cursor row and column information : Set smartindent shiftwidth=4//C language Auto indent, indent value is 4 characters wide Vim is a very useful editing tool, and here are a few common bottom line mode commands: ![]() Second, Vim Introduction and Configuration In this way, vim+taglist+cscope+ctags four tools we have installed, but how to use it? Similarly, cscope and ctags can also be installed in the same way, how refreshing it is! Thank you for the convenience of Ubuntu!įor TagList to be installed using this method, we need to download first and then install the complete:įirst download the TagList plugin online, download the completion of decompression, and then the file under the TAGLIST.VIM using CP command Copy to the Home/.vim/plugin folder (Cp-r taglist.vim ~/.vim/plugin) Ubuntu provides us with a lot of convenience to install software, for example, the installation of Vim we can directly use the "sudo apt-get install vim" can be installed! This article briefly introduces the use of several plug-ins in Vim (Ctags, Cscope and TagList) to implement a powerful editor, hoping to help you learn and use. Some people complain that the Linux system does not resemble VC and other convenient and quick editor, someone with Gedit, some use vim, but are not convenient and there is no automatic completion of the user-friendly functions such as the user. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |