configs/vim2/.vimrc

39 lines
777 B
VimL
Raw Normal View History

2025-03-04 22:49:50 +13:00
set tabstop=4 expandtab
set shiftwidth=4
set softtabstop=4
set autoindent
set cindent
set mouse=a
set number
set relativenumber
2025-03-24 09:20:35 +13:00
set ignorecase
let &t_EI = "\<Esc>[2 q"
let &t_SI = "\<Esc>[6 q"
2025-03-04 22:49:50 +13:00
syntax on
2025-03-24 09:20:35 +13:00
filetype plugin indent on
if !isdirectory($HOME."/.vim/undo-dir")
call mkdir($HOME."/.vim/undo-dir", "", 0700)
endif
set undodir=~/.vim/undo-dir
set undofile
2025-03-04 22:49:50 +13:00
call plug#begin()
Plug 'tpope/vim-sensible'
Plug 'sheerun/vim-polyglot'
Plug 'joe-skb7/cscope-maps'
Plug 'vimsence/vimsence'
2025-03-24 09:20:35 +13:00
Plug 'preservim/nerdcommenter'
Plug 'tomasiser/vim-code-dark'
2025-03-04 22:49:50 +13:00
call plug#end()
2025-03-24 09:20:35 +13:00
colorscheme codedark
noremap <C-_> <plug>NERDCommenterInvert
2025-03-04 22:49:50 +13:00
nnoremap gd :cscope find g <C-R><C-W><CR>
nnoremap gf :cscope find f <C-R><C-W><CR>
2025-03-24 09:20:35 +13:00
vnoremap <silent> <C-c> y:call system('wl-copy', @")<CR>