-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
99 lines (84 loc) · 2.57 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
96
97
98
""" Automatically create needed files and folders on first run (*nix only) {{{
if isdirectory('$HOME/.vim/autoload') == 0
call system('mkdir -p $HOME/.vim/{autoload,bundle,swap,undo}')
endif
if isdirectory('$HOME/.local/share/nvim/plugged') == 0
call system('mkdir $HOME/.local/share/nvim/plugged')
endif
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
" Automatically install vim-plug if needed
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
""" }}}
""" Neo/Vim Settings {{{
" Disable swap files. Yes.
set noswapfile
set encoding=UTF-8
" Set tabs to 2 spaces
set tabstop=2
set shiftwidth=2
set foldmethod=indent
" Set indent and numbers
set number
set numberwidth=4
set smartindent
set cindent
" Set new window position
set splitright " Split new vertical windows right of current window .
set splitbelow " Split new horizontal windows under current window.
" Misc settings
set virtualedit=all
set clipboard=unnamed
set more
set scrolloff=3
set showcmd
set noshowmode
set title
set completeopt=menu,preview,longest
set laststatus=2
set ttyfast
set autoread
set noautowrite
set autoindent
set backspace=indent,eol,start
set cinkeys-=0#
set expandtab
set termguicolors
set incsearch
set hlsearch
set foldenable
set foldlevelstart=3
set foldnestmax=10
set pastetoggle=<F6>
""" Wildmode/wildmenu command-line completion {{{
set wildignore+=*.bak,*.swp,*.swo
set wildignore+=*.a,*.o,*.so,*.pyc,*.class
set wildignore+=*.jpg,*.jpeg,*.gif,*.png,*.pdf
set wildignore+=*/.git*,*.tar,*.zip
set wildignore+=*/node_modules/*,*/dist/*,*/public/*,coverage,*/__pycache__/*
set wildmenu
set wildmode=longest:full,list:full
""" }}}
""" Return to last edit position when opening files {{{
augroup LastPosition
autocmd! BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
""" }}}
if filereadable(expand("$HOME/.onhernandes/dotfiles/vim/local/settings.vim"))
so $HOME/.onhernandes/dotfiles/vim/local/settings.vim
endif
""" }}}
""" Custom Mappings {{{
so $HOME/.onhernandes/dotfiles/vim/mappings.vim
if filereadable(expand("$HOME/.onhernandes/dotfiles/vim/local/mappings.vim"))
so $HOME/.onhernandes/dotfiles/vim/local/mappings.vim
endif
""" }}}
""" VimPlug {{{
so $HOME/.onhernandes/dotfiles/vim/plugins.vim
""" }}}