Vim_configuration

1. Commands:

1)

2)

3)

4)

5)

6)

 

 7)  (num of lines to move) - shift - >>  " move a Tab to right side

          (num of lines to move) - shift - <<  " move a Tab to left side 

    

 8)  ctrl - t  " move a Tab to right side

          ctrl - d     " move a Tab to left side

    (used in insert mode)

 9)  : vs - ' filepath/name '  " create a new window vertically

          : sp - ' filepath/name'  " create a new window horizontally

10)  : ls  " the command list just input

     : sb - 'num'  " to choose the num

     : vert sb -'num'  " will create a vertically window

11)  : tabe(dit) - ' filepath/name'  " create a new tab window

     g - t  " go to the forward tab window

          g - T  " go to backward tab window

12)  shift - v  " into 'visual line' mode, could select several lines to indent, input the same command will go to 'command' mode

 

2. Set Commands:

1)  set: list  " to show the symbol of spaces and tab

2)  set: expandtab  " when press tab, it will convert to four spaces, in condition that set tabstop=4

3)  set: shiftwidth=4  

4)  set: autoindent  " combining this command with 'expandtab' is the best result

5)  set: smartindent  " when using commands "o, O", it will indent automatically

6)  set: cursorline  " the place where the cursor is in will come out a line

7)  set: splitbelow  " the direction of creating a new window

8)  set: splitright  " the direction of creating a new window

 

 

 

 

using this command to configure Vim editor:

   sudo vim <~/vim/vimrc>

and input:

  set tabstop=4

  set nu

  set autoindent (because python use spaces, not set in vimrc, just set when write HTML file)

     set title

" Indent automatically depending on filetype
filetype indent on
set autoindent

" Turn on line numbering. Turn it off with "set nonu"
set number

" Set syntax on
syntax on

" Case insensitive search
set ic

" Higlhight search
set hls

" Wrap text instead of being on one line
set lbr

" Change colorscheme from default to delek
colorscheme delek

 

Reference Link:

https://help.ubuntu.com/community/VimHowto

 

转载于:https://www.cnblogs.com/bajunma123/p/5426763.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值