78 lines
1.4 KiB
VimL
78 lines
1.4 KiB
VimL
set nocompatible
|
|
set showcmd
|
|
set rnu
|
|
|
|
syntax on
|
|
filetype on
|
|
filetype plugin on
|
|
filetype indent on
|
|
|
|
colorscheme onedark
|
|
hi Comment guifg=#b7ffbd ctermfg=102
|
|
hi Normal guifg=#eeeeee guibg=#00000ee
|
|
|
|
let g:airline#extensions#tabline#enabled = 1
|
|
let g:airline_powerline_fonts = 1
|
|
|
|
" --BACKUP
|
|
set backup
|
|
set backupdir=~/.vim/backup/
|
|
set writebackup
|
|
set backupcopy=yes
|
|
au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
|
|
|
|
" --Display
|
|
set mouse=ar
|
|
set title
|
|
set number "Line numbers
|
|
set ruler
|
|
set wrap
|
|
set scrolloff=3
|
|
set lazyredraw
|
|
set termguicolors
|
|
set foldmethod=indent
|
|
set foldlevelstart=8 "Don't fold automatically unless really nested
|
|
|
|
" --Search
|
|
set ignorecase
|
|
set smartcase
|
|
set incsearch
|
|
set hlsearch
|
|
|
|
" --Tab
|
|
set tabstop=4
|
|
set shiftwidth=4
|
|
set softtabstop=0
|
|
|
|
" --Beep
|
|
set visualbell
|
|
set noerrorbells
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
set hidden
|
|
|
|
" --Svelte files are essentially HTML
|
|
autocmd BufRead,BufNewFile *.svelte set filetype=html
|
|
|
|
" --My cute shortcuts
|
|
noremap // :nohls<CR>
|
|
inoremap jj <Esc>
|
|
|
|
" (q)uit, (w)ith path edit, (e)dit, (r)eload
|
|
noremap ,q :wqa<CR>
|
|
noremap ,w :edit<SPACE>
|
|
noremap ,e :Files<CR>
|
|
noremap ,r :so ~/.vimrc<CR>
|
|
" (h)elp
|
|
noremap ,f :CocCommand explorer --toggle<CR>
|
|
noremap ,h :help<SPACE>
|
|
|
|
noremap <C-j> :bn<CR>
|
|
noremap <C-k> :bp<CR>
|
|
|
|
autocmd FileType cpp noremap ,c :!g++<SPACE>
|
|
autocmd FileType cpp map ,cf ,c"%"<CR>
|
|
autocmd FileType cpp map ,r ,c-o a ;./a;rm a<C-Left><C-Left>
|
|
autocmd FileType cpp map ,rf ,r"%"<CR>
|