108 lines
2.9 KiB
VimL
108 lines
2.9 KiB
VimL
" - Config -
|
|
"" Encoding
|
|
set encoding=utf8
|
|
"" Disable modeline
|
|
set nomodeline
|
|
"" System undo levels
|
|
set undofile
|
|
set undolevels=100
|
|
"" Indenting
|
|
set tabstop=2
|
|
set softtabstop=2
|
|
set shiftwidth=2
|
|
set expandtab
|
|
"" Disable error sounds
|
|
set noerrorbells
|
|
"" Stop word wrapping
|
|
set nowrap
|
|
"" Show invisible characters
|
|
set conceallevel=1
|
|
"" Enable search highlighting
|
|
set hlsearch
|
|
"" Line Numbers
|
|
set number relativenumber
|
|
"" Top/Bottom scroll padding
|
|
set scrolloff=3
|
|
set sidescrolloff=5
|
|
"" Enable autoread if file changes
|
|
set autoread
|
|
"" Hide Buffers
|
|
set hidden
|
|
"" Statusline
|
|
set laststatus=0
|
|
|
|
" - Mappings -
|
|
"" Map Leader to spacebar
|
|
let mapleader=" "
|
|
"" Shortcut to save
|
|
nnoremap <Leader>w :w<CR>
|
|
"" Moving current lines up/down
|
|
nnoremap <Leader>k :<c-u>execute 'move -1-'. v:count1<cr>
|
|
nnoremap <Leader>j :<c-u>execute 'move +'. v:count1<cr>
|
|
"" Buffers Next/Previous
|
|
nnoremap <Tab> :bnext<CR>
|
|
nnoremap <S-Tab> :bprev<CR>
|
|
"" Shortcut to close buffer
|
|
nnoremap <Esc><Esc> :bd<CR>
|
|
"" Shortcut to reopen closed buffer
|
|
nmap <Leader><Leader> <c-^>
|
|
|
|
" - Load Plugins -
|
|
"" Begin vim-plug
|
|
call plug#begin('~/.vim/plugged')
|
|
"" Visual Plugins
|
|
Plug 'mhinz/vim-startify'
|
|
Plug 'dracula/vim'
|
|
Plug 'ap/vim-buftabline'
|
|
"" Syntax Plugins
|
|
Plug 'dense-analysis/ale'
|
|
"" Ease of Editing Plugins
|
|
Plug 'tpope/vim-surround'
|
|
Plug 'tpope/vim-eunuch'
|
|
Plug 'tpope/vim-surround'
|
|
"" Project/File Navigation Plugins
|
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
|
Plug 'junegunn/fzf.vim'
|
|
"" Git
|
|
Plug 'tpope/vim-fugitive'
|
|
Plug 'airblade/vim-gitgutter'
|
|
"" Initialize plugin system
|
|
call plug#end()
|
|
|
|
" - Config Plugins -
|
|
"" Colorscheme Dracula
|
|
let g:dracula_colorterm = 0 " Set background as transparent
|
|
colorscheme dracula
|
|
"" FZF
|
|
nnoremap <Leader>t :Files<cr>
|
|
nnoremap <Leader>T :Buffers<cr>
|
|
nnoremap <Leader>g :Ag
|
|
nnoremap <Leader>c :Commits<cr>
|
|
nnoremap <Leader>C :BCommits<cr>
|
|
nnoremap <Leader>m :GFiles?<cr>
|
|
"" Buftablines
|
|
let g:buftabline_indicators=1
|
|
highlight BufTabLineFill ctermfg=11
|
|
highlight BufTabLineCurrent cterm=bold ctermfg=236 ctermbg=141 gui=bold guifg=#282A36 guibg=#BD93F9
|
|
"" vim-startify
|
|
let g:startify_custom_header = [
|
|
\ ' Gaiety | 2019',
|
|
\ ' ____ ____ __ ',
|
|
\ ' / __/__ ___ ________ / __ \____/ /____ ___ __ _____',
|
|
\ ' _\ \/ _ \/ _ `/ __/ -_) / /_/ / __/ __/ _ \/ _ \/ // (_-<',
|
|
\ '/___/ .__/\_,_/\__/\__/ \____/\__/\__/\___/ .__/\_,_/___/',
|
|
\ ' /_/ /_/ ',
|
|
\ '',
|
|
\ 'MAPPING ACTION',
|
|
\ '----------------------------------------------------------',
|
|
\ '<Space> Leader',
|
|
\ '<Leader>w Save Buffer',
|
|
\ '<Esc><Esc> Close Buffer',
|
|
\ '<Leader><Leader> Open Previous Buffer',
|
|
\ '<Tab> Next buffer',
|
|
\ '<S-Tab> Previous buffer',
|
|
\ '<Leader>k Move line up',
|
|
\ '<Leader>j Move line down',
|
|
\ '',
|
|
\ ]
|
|
let g:startify_change_to_dir = 0
|