Index

dotfiles / master

My personal dotfiles for Debian/Ubuntu.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
6416 Mar 2023 18:382d5205aMake NERDTree persist across tabsJosh Stockin12918G

Blob @ dotfiles / vimrc

text/plain2979 bytesdownload raw
1set nocompatible
2set t_RB=
3set t_RF=
4set t_u7=
5
6au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
7 \| exe "normal! g'\"" | endif
8
9" Formatting configuration
10filetype plugin indent on
11set spelllang=en_us
12set encoding=utf-8
13
14" Keyboard mapping
15let mapleader=" "
16set clipboard=unnamedplus
17
18inoremap jk <ESC>
19noremap <leader>w ^
20noremap <leader>e $
21noremap <leader>f <c-w>
22noremap <c-n> :tabnew<CR>
23noremap <leader><CR>1 :b1<CR>
24noremap <leader><CR>2 :b2<CR>
25noremap <leader><CR>3 :b3<CR>
26noremap <leader><CR>4 :b4<CR>
27noremap <leader><CR>5 :b5<CR>
28noremap <leader><CR>6 :b6<CR>
29noremap <leader><CR>7 :b7<CR>
30noremap <leader><CR>8 :b8<CR>
31noremap <leader><CR>9 :b9<CR>
32noremap <leader>t :ter<CR>
33noremap <leader>r :so $MYVIMRC<CR>
34noremap <leader>1 1gt
35noremap <leader>2 2gt
36noremap <leader>3 3gt
37noremap <leader>4 4gt
38noremap <leader>5 5gt
39noremap <leader>6 6gt
40noremap <leader>7 7gt
41noremap <leader>8 8gt
42noremap <leader>9 9gt
43
44map <leader>n :NERDTreeToggle<CR>
45
46" Vim style configuration
47syntax on
48
49set scrolloff=12
50set showcmd
51set showmatch
52
53set number
54set numberwidth=4
55
56set tabstop=4
57set shiftwidth=4
58set smarttab
59set expandtab
60
61" Enable Plug plugins
62call plug#begin(expand('<sfile>:p:h') . '/plugged')
63
64Plug 'vim-airline/vim-airline'
65Plug 'vim-airline/vim-airline-themes'
66Plug 'sainnhe/sonokai'
67Plug 'tribela/vim-transparent'
68Plug 'tpope/vim-fugitive'
69Plug 'scrooloose/nerdtree'
70Plug 'ryanoasis/vim-devicons' "RMHEADLESS
71Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
72Plug 'bling/vim-bufferline'
73Plug 'airblade/vim-gitgutter'
74Plug 'jiangmiao/auto-pairs'
75Plug 'tpope/vim-surround'
76Plug 'sheerun/vim-polyglot'
77Plug 'meatballs/vim-xonsh'
78Plug 'valloric/matchtagalways'
79Plug 'godlygeek/tabular'
80Plug 'jistr/vim-nerdtree-tabs'
81
82call plug#end()
83
84
85" Automatically install any Plug plugins
86autocmd VimEnter *
87 \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
88 \| PlugInstall --sync
89 \| q
90 \| qa!
91 \| endif
92
93
94if (has("termguicolors"))
95 set termguicolors
96endif
97
98autocmd ColorScheme * highlight! link SignColumn LineNr
99autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE
100autocmd ColorScheme * highlight NonText ctermbg=NONE guibg=NONE
101autocmd ColorScheme * highlight VertSplit cterm=NONE ctermbg=NONE guibg=NONE
102autocmd ColorScheme * highlight LineNr ctermbg=NONE guibg=NONE
103
104let g:sonokai_style = 'atlantis'
105let g:sonokai_better_performance = 1
106
107colorscheme sonokai
108
109" Airline
110set laststatus=2
111let g:airline_powerline_fonts=1 "RMHEADLESS
112let g:airline_theme='sonokai'
113
114" Git Gutter
115let g:gitgutter_set_sign_backgrounds=1
116set updatetime=250
117
118" NERDTree
119let NERDTreeShowHidden=1
120let NERDTreeChDirMode=3
121
122" Open NERDTree with vim
123let g:nerdtree_tabs_open_on_console_startup=1
124" Open NERDTree in the new tabs
125let g:nerdtree_tabs_open_on_new_tab=1
126let g:nerdtree_tabs_meaningful_tab_names=1
127let g:nerdtree_tabs_toggle=1
128let g:nerdtree_tabs_autoclose=1
129" Synchronize NERDTree's tabs
130let g:nerdtree_tabs_synchronize_view=1
131