【vim】使用指南

1、多行合并为一行

:%s/\n/ /g

2、行尾标记符$

3、au BufNewFile,BufRead *.svi set filetype=vim

4、设置vim窗口打开大小

set lines=45 columns=180

set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
set langmenu=zh_CN.UTF-88
set langmenu=zh_CN.UTF-8
filetype plugin indent on " enable filetype auto identify
set nocompatible " no vi cfg
set number " display line number
set ignorecase
set noignorecase
set cursorline
set ruler
set nowrap
set shiftwidth=4 " autoindent shift width
set softtabstop=4 " just 4, not 4x
set tabstop=4 " use 4 blank instead tab
set cin " c indent
set guifont=Monospace\ 12 "
set et
set expandtab " do not want to see tab
set linebreak " line break with word
set nobackup " no backup files
set noswapfile " no swap files
set nowritebackup " only in case you don’t want a backup file while editing
set noundofile " no undo files
set hlsearch
set incsearch
set wrap
set showtabline=2 " 0 -> always-no; 1 -> new-tab, and display; 2 -> always

set guioptions-=T
set guioptions-=m
"set ttimeout
"set ttimeoutlen=100
"colorscheme onedark " darkblue
"colorscheme PaperColor
"set background=dark
"set background=light
"colorscheme one
set mouse=nv

"ctrl-s =save
map :NERDTreeMirror
map :NERDTreeToggle

"insert mode: BS for del
set backspace=indent,eol,start
au BufNewFile,BufRead *.f set filetype=vim
au BufNewFile,BufRead *.svi set filetype=vim
au BufNewFile,BufRead *.svp set filetype=vim
au BufNewFile,BufRead *.cmd set filetype=vim
au BufNewFile,BufRead *.txt set filetype=vim
au BufNewFile,BufRead *.mk set filetype=vim
" use function
if (empty($TMUX))
if (has(“nvim”))
"For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
"Based on Vim patch 7.4.1770 (guicolors option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
if (has(“termguicolors”))
set termguicolors
endif
endif
syntax on

winpos 300 150 " 初始界面位置
set t_8b=^[[1;2;%lu;%lu;%lum "enable true color
set t_8f=^[[1;2;%lu;%lu;%lum

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值