基础知识
Vim,全称“Vi IMproved”,是一种高度可定制的文本编辑器,是Unix和Linux系统上最基本的文本编辑器之一。https://baike.baidu.com/item/Vim/60410?fr=ge_ala
:set number

#打开
set number
#关闭
set nonumber
:set number?
:help number
基本配置
set nocompatible
syntax on
set showmode
set showcmd
set mouse=a
set encoding=utf-8
set t_Co=256
filetype indent on
缩进
set autoindent
set tabstop=2
set shiftwidth=4
set expandtab
set softtabstop=2
外观
set number
set relativenumber

set cursorline

set textwidth=80
set wrap
set nowrap
0 表示不显示 1 表示只在多窗口时显示 2 表示显示
set laststatus=2
set ruler
搜索
set showmatch



set hlsearch

set ignorecase

set smartcase

编辑
set spell spelllang=en_us

set listchars=tab:»■,trail:■
set list

在命令模式下按 control + 进入 visual block 模式。在该模式下通过上下左右键选择要注释的行。 按 I 键或者 shift + 进入到行首。 输入注释代码。一般为 或 # 。 连续按下两次 Esc 键。




本文作者:钱 超(上海新炬中北团队)
本文来源:“IT那活儿”公众号

文章转载自IT那活儿,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。