-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim
53 lines (40 loc) · 1.19 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
call plug#begin('~/.config/nvim/plugged')
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'}
Plug 'vimwiki/vimwiki'
Plug 'jpalardy/vim-slime'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
call plug#end()
colorscheme slate
let mapleader = ","
nnoremap <silent> <leader>ce :tabnew ~/.config/nvim/init.vim<CR>
nnoremap <silent> <leader>d :noh<CR>
nnoremap <silent> <leader>t :NERDTreeToggle<CR>
inoremap ' "
inoremap " '
command! W normal :w<CR>
command! Wq normal :wq<CR>
command! Q normal :q!<CR>
command! Qa normal :qa!<CR>
au BufWritePost *.py exe "!flake8 %"
au BufWritePost *.lua exe "!lualint %"
au BufReadPre *.c set et sts=2 sw=2
au Syntax haskell set et sts=2 sw=2
au BufReadPre *.md,*.wiki,*.txt,*.rst set et sts=2 sw=2
au BufWritePre * %s/\ \+$//ge
set linebreak
set undofile
set number
function! AttachProjectConfig()
if filereadable(".vimconfig")
source .vimconfig
endif
endfunction
if !exists("project_config_attach")
let project_config_attach = 1
autocmd VimEnter * call AttachProjectConfig()
endif
let g:vimwiki_list = [{'path': '~/vimwiki',
\ 'syntax': 'markdown', 'ext': '.md'}]