-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
70 lines (53 loc) · 1.43 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
"plugins stored in '$XDG_DATA_HOME/nvim/plugged'
call plug#begin()
Plug 'morhetz/gruvbox'
" auto insert brackets, parens, quotes in pairs
Plug 'jiangmiao/auto-pairs'
" colorize hexcodes and other stuff
Plug 'norcalli/nvim-colorizer.lua'
" comment functions
Plug 'preservim/nerdcommenter'
" complete code snippets
Plug 'SirVer/ultisnips'
" markdown preview in browser
Plug 'JamshedVesuna/vim-markdown-preview'
call plug#end()
if (has("termguicolors"))
set termguicolors
endif
lua require 'colorizer'.setup()
let g:UltiSnipsSnippetDirectories=['~/.config/nvim/ultisnips']
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
" Grip
let vim_markdown_preview_github=1
syntax on
set number relativenumber
set encoding=utf-8
colorscheme gruvbox
" cursor floats n lines above the bottom line on screen
set scrolloff=5
" smartcase search: ignorecase if lowercase
" word> word,WORD,Word
" Word> Word
set ignorecase smartcase
" tab is 4 spaces
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set fileformat=unix
filetype plugin on
augroup YamlCode
autocmd!
autocmd BufReadPre,FileReadPre *.yml set ft=yaml
augroup END
let filetype_i = "nasm"
" disable prompt to save file when changing buffer goes to 'hidden'
set hidden
autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2 expandtab
" Keybinds
nmap <S-u> O<Esc>0"_D
nmap <CR> o<Esc>0"_D