-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
95 lines (73 loc) · 2.15 KB
/
.vimrc
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
if v:progname == 'vi'
set noloadplugins
endif
let mapleader = "\<Space>"
let g:netrw_liststyle = 3 " preferred appearance style. It can be changed with i while using it
let g:netrw_banner = 0 " remove top banner
let g:netrw_browse_split = 4 " opens split in separate window, kind of like nerdtree
let g:netrw_altv = 1
"let g:netrw-v = 1
let g:netrw_winsize = 25
noremap <leader>n :NERDTreeToggle<CR>
let g:NERDTreeWinPos = "right" " open NERDTree on the right side
" script to toggle netrw window, mapped to <leader>n
let g:NetrwIsOpen=0
function! ToggleNetrw()
if g:NetrwIsOpen
let i = bufnr("$")
while (i >= 1)
if (getbufvar(i, "&filetype") == "netrw")
silent exe "bwipeout " . i
endif
let i-=1
endwhile
let g:NetrwIsOpen=0
else
let g:NetrwIsOpen=1
silent Vexplore!
endif
endfunction
" noremap <leader>n :call ToggleNetrw()<CR>
" Autocmds
" Fix splits size (make them equal) when vim window is resized
autocmd VimResized * execute "normal! \<c-w>="
" If installed using Homebrew
set rtp+=/usr/local/opt/fzf
" VimWiki
let g:vimwiki_list = [
\ {'path': '~/Dropbox/obsidian/', 'syntax': 'markdown', 'ext': '.md'}
\ ]
if &loadplugins
if has('packages')
packadd! ale
packadd! base16-vim
packadd! terminus
"packadd! typescript-vim
"packadd! vim-clipper
"packadd! vim-dirvish
"packadd! vim-docvim
"packadd! vim-easydir
"packadd! vim-fugitive
"packadd! vim-git
"packadd! vim-javascript
"packadd! vim-json
"packadd! vim-jsx
"packadd! vim-markdown
packadd! php
"packadd! vim-projectionist
"packadd! vim-repeat
"packadd! vim-signature
"packadd! vim-surround
packadd! vim-zsh
else
source $HOME/.vim/pack/bundle/opt/vim-pathogen/autoload/pathogen.vim
call pathogen#infect('pack/bundle/opt/{}')
endif
endif
" Automatic, language-dependent indentation, syntax coloring and other
" functionality.
"
" Must come *after* the `:packadd!` calls above otherwise the contents of
" package "ftdetect" directories won't be evaluated.
filetype indent plugin on
syntax on