当前位置:网站首页>How to personalize VIM editor format (DIY)

How to personalize VIM editor format (DIY)

2022-06-26 14:21:00 select one pointer

Sometimes we face some repetitive problems , Programmers always want to configure themselves for repetitive problems ,vim So many header files before , It's not very friendly to new people , Don't talk too much. Start

<< The preceding numbers are the steps

1.cd /etc/vim
2.cp vimrc ~vimrc( Backup )
3.sudo vim vimrc
4. Add the following statement on vimrc in 
set number
set cursorline
set tabstop=4
set hlsearch
set smartindent
set showcmd
set cmdheight=2

autocmd BufNewFile *.c 0r /etc/vim/template.c

<< The renderings are as follows :

<<DIY Personalized configuration -- Create a class template named template.c Can be implemented c file

/**********************************************************************/                                                           
/*******************************AAAA********************************/
/*********************************VVVV***********************************/
/**********************************************************************/ 
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<fcntl.h>
#include<unistd.h>
#include<errno.h> 
 int main(int argc, char* argv[])
  {

     return 0;
  }
  
 /***********************************************************************/
 /*********************************end***********************************/
 /***********************************************************************/

 7. Check whether it is successful after switching to the home directory

So simple DIY Just ok 了

原网站

版权声明
本文为[select one pointer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170508516605.html