-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim
79 lines (59 loc) · 2.14 KB
/
init.vim
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
"-----------------PLUGINS-----------------"
" Specify a directory for plugins (for Neovim: ~/.local/share/nvim/plugged)
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'mhartington/oceanic-next'
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
" Initialize plugin system
call plug#end()
"-----------------LOOK-AND-FEEL-----------------"
syntax enable " Theme
colorscheme OceanicNext " Theme
set showmatch " Show matching brackets.
set showmode " Show current mode.
set ruler " Show the line and column numbers of the cursor.
set number " Show the line numbers on the left side.
set laststatus=2 " Keep showing the statusline (do not make it disapear)
set incsearch " Show result of search live when typing
set hlsearch " Highlight searches
" Line number same background as the editor
hi LineNr ctermbg=bg
" Get rid of ugly split border
hi vertsplit guifg=bg guibg=bg
"-----------------FUNCTIONALITY-----------------"
:set tabstop=4 shiftwidth=4 expandtab
" make searches case-sensitive only if they contain upper-case characters
set ignorecase smartcase
" use emacs-style tab completion when selecting files, etc
set wildmode=longest,list,full
" make tab completion for files/buffers act like bash
set wildmenu
"-----------------MAPPINGS-----------------"
:command WQ wq
:command Wq wq
:command W w
:command Q q
" Remove the Escape functionality
inoremap <Esc> <NOP>
" Remap Escape. Add no jumps after leaving insert mode
inoremap <silent> jj <C-O>:stopinsert<CR>
" Use comma instead of colon. Easier on DK keyboards.
nnoremap , :
" Remove the colon functionality
nnoremap : <NOP>
" Disable arrow keys
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
let mapleader = '.' "The default is \, but a dot is much better.
nnoremap <Leader>ev :tabedit $MYVIMRC<cr>
nnoremap <Leader>f :FZF<cr>
nnoremap <Leader>s :w<cr>
nnoremap <Leader>es :tabedit ~/.config/nvim/snippets/