This repository was archived by the owner on Aug 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.vimrc
More file actions
118 lines (92 loc) · 2.36 KB
/
.vimrc
File metadata and controls
118 lines (92 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
" Vim-Plug
call plug#begin('~/.vim/plugged')
" Basic agreeable settings
Plug 'tpope/vim-sensible'
" Airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline_powerline_fonts = 1
let g:airline_theme='deus'
let g:airline#extensions#branch#enabled = 1
" Fix fixed-width character
let g:airline_symbols = {}
let g:airline_symbols.linenr = '¶'
" Fugitive (git)
Plug 'tpope/vim-fugitive'
" Autocompletion
Plug 'Valloric/YouCompleteMe', { 'do': 'python3 install.py' }
" Plug 'Valloric/YouCompleteMe', { 'do': './install.py --all' }
" Go
" Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
" Lisp
Plug 'tpope/vim-fireplace'
" Plug 'bhurlow/vim-parinfer'
" Fuzzy Finder
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
map <C-p> :FZF<CR>
" Buffer helper
Plug 'mhinz/vim-sayonara'
" Close buffers
cnoreabbrev W w
cnoreabbrev wq w<bar>Sayonara
cnoreabbrev Wq w<bar>Sayonara
cnoreabbrev WQ w<bar>Sayonara
cnoreabbrev q Sayonara
cnoreabbrev Q Sayonara
cnoreabbrev qq q
cnoreabbrev E e
" TypeScript
" Plug 'leafgarland/typescript-vim'
" Whitespace
Plug 'ntpeters/vim-better-whitespace'
" Themes
Plug 'ajmwagar/vim-deus'
Plug 'sickill/vim-monokai'
" Initialize plugin system
call plug#end()
" Disables comment autocomplete
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" Line numbers
set relativenumber
set number
nnoremap <F2> :set nonumber! norelativenumber! <CR>
" Common typos
" command! Wq wq
" command! WQ wq
" command! W w
" command! Q q
" command! Tabn tabn
" command! Tabp tabp
" Navigate buffers
" nnoremap [1;7D :bprevious<CR>
" nnoremap [1;5D :bprevious<CR>
" nnoremap [1;7C :bnext<CR>
" nnoremap [1;5C :bnext<CR>
nnoremap <C-j> :bnext<CR>
nnoremap <C-k> :bprevious<CR>
nnoremap <C-l> :bnext<CR>
nnoremap <C-h> :bprevious<CR>
nnoremap <C-t> :enew<CR>
" Keep multiple buffers unsaved
set hidden
" Case insensitive
set ignorecase
set smartcase
" Tabs
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
" Highlight
highlight CursorLine cterm=NONE ctermbg=black guibg=black
highlight Search cterm=NONE ctermfg=black ctermbg=lightblue
set cursorline
set hlsearch
" Use theme
colorscheme deus
" Set encoding
set encoding=utf-8
" Set colors
set t_Co=256
" Enable mouse
set mouse=a