我的ideavim配置文件

ideavim的配置文件

" ===============================================
" === set设置===================================
" ===============================================
" 设置leader键"
let mapleader=" "

"设置剪贴板
set clipboard=unnamed
let &t_ut=''
set autochdir

" 设置寻找高亮
set hlsearch
exec "nohlsearch"
set incsearch

"从不备份
set nobackup

" 不要使用vi的键盘模式,而是vim自己的
set nocompatible

" 设置没有声音
set noerrorbells
set novisualbell

" 设置在cmap单词补全
set wildmenu

" 设置搜索ignorecase/smartcase
set ignorecase
set smartcase

set t_vb=
set tm=500

" 设置行号
set number
set relativenumber

" 设置最大标签页
set tabpagemax=20

"设置水平显示
set cursorline
set cuc

" 设置tab键和自动缩进
set tabstop=4
set shiftwidth=4
set softtabstop=4
” 下一行和上一行的格式相同
set autoindent
set cindent

" 不要用空格代替制表符
set noexpandtab

" 在行和段开始处使用制表符
set smarttab

"编码设置
set encoding=utf-8  
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set fileformats=unix,dos,mac  
set termencoding=utf-8                                                                                                                                     
set formatoptions+=m
set formatoptions+=B

" 可以在buffer的任何地方使用鼠标(类似office中在工作区双击鼠标定位)
set mouse=a
set selection=exclusive
set selectmode=mouse,key

" 在被分割的窗口间显示空白,便于阅读
set fillchars=vert:\ ,stl:\ ,stlnc:\
" 高亮显示匹配的括号
“ set showmatch
" 设置在状态栏显示按键
set showcmd

” 总是显示状态栏
set showtabline=2

” 设置显示行尾结束符和制表符/空格和tab的样式
set list
set listchars=tab:\|\ ,trail:▫

“ 总是显示状态栏
set laststatus=2

” 设置粘贴的模式
set paste
” 显示光标当前位置'
set ruler


" 设置一直留下的行数
set scrolloff=15

" 设置vim操作的等待时间
set ttimeoutlen=0
set notimeout

“ 设置字不超过窗口
set wrap

set tw=0
set indentexpr=
set foldmethod=indent
set foldlevel=99
set foldenable
set formatoptions-=tc
set splitright
set splitbelow
set noshowmode

set shortmess+=c
set completeopt=longest,noinsert,menuone,noselect,preview
set ttyfast "should make scrolling faster
set visualbell
set colorcolumn=80
set updatetime=1000
set virtualedit=block
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif

" ===============================================
" === 移动光标===================================
" ===============================================

" J K 快速移动上下五行
noremap <silent> K 5k
noremap <silent> J 5j

"  快速到行首
noremap H 0
"  快速到行尾
noremap L $

" 快速的单词跳转
noremap W 5w
noremap B 5b

" 快速移动5行
noremap <C-J> 5<C-y>
noremap <C-K> 5<C-e>

" 在插入模式下快速到行尾和行首
inoremap <C-h> <Left>
inoremap <C-j> <Down>
inoremap <C-k> <Up>
inoremap <C-l> <Right>
inoremap <C-a> <Home>
inoremap <C-e> <End>









" ===============================================
" === 复制,删除,查找和替换恢复和撤消=============
" ===============================================
" 快速选中一个单词
noremap vw viwl

" 快速选中括号中的内
noremap vb vibl

" 快速选中""的内
noremap v' vi"l

" 快速选中''的内
noremap v" vi"l

" 快速选html标签中的
noremap vt vitl

noremap vws viwl"+p
noremap vbs vibl"+p
noremap vts vitl"+p
noremap v's vi"l"+p
noremap v"s vi'l"+p
" ===
" ===b () t html中的<>  s {}
" ===

" ciw
nnoremap ciw "+ciw
nnoremap cw ciw

" ci'   "word"
nnoremap ci" "+ci'
nnoremap c" ci'

" cib   (word)
nnoremap cib "+cib
nnoremap cb cib

" ci"   "word"
nnoremap ci' "+ci"
nnoremap c' ci"

"   cis     {word}
nnoremap cis "+ci{
nnoremap cs ci{

" cit   <>word<>
nnoremap cit "+cit
nnoremap ct cit

" yiw
  • 2
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值