Linux的相关设置:

1、首先在root用户界面,回到根目录(cd /)

2、再去home里(cd home),ls一下就可以发现我们自己的用户名文件

3、cd 到这个文件里,在命令行输入:vi ~/.vimrc

如图所示:



接着在打开的编辑器中输入以下的代码:

      1 "leader

      2 let mapleader = ','

      3 let g:mapleader = ','

      4

      5

      6

      7 set nu

      8 set ts=4

      9 "syntax

     10 syntax on

     11 set history = 2000

     12

     13 filetype on

     14 filetype plugin on

     15 filetype indent on

     16

     17 set nocompatible

     18 set autoread

     19 set shortmess=atI

     20

     21 set magic

     22 set title

     23 set nobackup

     24 set warp

     25

     26 set novisualbell

     27 set noerrorbells

     28 set visualbell t_vb=

     29 set t_vb=

     30 set tm=500

     31

     32

     33 set cursorcolumn

     34 set cursorline

     35

     36 set scrolloff=7

     37

     38 set ruler

     39 set number

     40 set nowrap

     41 set showcmd

     42 set showmode

     43 set showmatch

     44 set matchtime=2

     45

     46 set hlsearch

     47 set incsearch

     48 set ignorecase

     49 set smartcase

     50

     51 set expandtab

     52 set smarttab

     53 set shiftround

     54

     55 set autoindent smartindent shiftround

     56 set shiftwidth=4

     57 set tabstop=4

     58 set softtabstop=4

     59

     60 "NOT SUPPORT

     61 "fold

     62 set foldenable

     63 set foldenable=indent

     64 set foldlevel=99

     65 set g:FoldMethod = 0

     66 map<leader>zz:calltoggleFold()<cr>

     67 fun! ToggleFold()

     68         if g:FlodMethod == 0

     69                 exe "normal! zM"

     70                 let g:FlodMethod = 1

     71         else

     72                 exe "normal! zR"

     73                 let g:FLodMethod = 0

     74         end if

     75 endfun

    
编写完成后就可以保存退出了,然后打开一个vim编译器查看一下,看有没有格式上的改变(我的vim本来一打开默认没有行号,现在就有了而且编写代码的时候格式也是设定的比较美观的,不用自己再调格式了)

建议大家最后再对照代码检查一遍,因为代码较多容易出错!


友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信