-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
117 lines (78 loc) · 2.89 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" ██╗ ██╗██╗███╗ ███╗██████╗ ██████╗
" ██║ ██║██║████╗ ████║██╔══██╗██╔════╝
" ██║ ██║██║██╔████╔██║██████╔╝██║
" ╚██╗ ██╔╝██║██║╚██╔╝██║██╔══██╗██║
" ╚████╔╝ ██║██║ ╚═╝ ██║██║ ██║╚██████╗
" ╚═══╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" I followed guides from
" https://www.freecodecamp.org/news/vimrc-configuration-guide-customize-your-vim-editor/
" Default values{{{
source $VIMRUNTIME/defaults.vim
" }}}
" Enable folding{{{
set foldmethod=manual
" }}}
" My Plugins{{{
call plug#begin()
" List your plugins here
Plug 'tpope/vim-sensible'
Plug 'github/copilot.vim'
Plug 'scrooloose/nerdtree'
call plug#end()
" }}}
" Vimscript Settings{{{
" Enable folding
augroup filetype_vim
autocmd!
autocmd FileType vim setlocal foldmethod=marker
augroup END
" If the current file type is HTML, set indentation to 2 spaces.
autocmd Filetype html setlocal tabstop=2 shiftwidth=2 expandtab
if version >= 703
set undodir=~/.vim/backup
set undofile
set undoreload=10000
endif
" }}}
" Status line Settings{{{
set statusline=\ %F%m
set statusline+=%=
set statusline+=\ line:\ %l\ col:\ %c\ percent:\ %p%%
" Show current file and dimensions
set showmode
" Make wildmenu behave like similar to Bash completion.
set wildmode=list:longest
" There are certain files that we would never want to edit with Vim.
" Wildmenu will ignore files with these extensions.
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
" }}}
" Key mappings{{{
inoremap jj <Esc>
" execute python scripts with f5
nnoremap <F5> :w <CR>:!python3 %<CR>
" navigating split view with ctrl + hjkl
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" NERDTree
nnoremap <F3> :NERDTreeToggle<cr>
" Have nerdtree ignore certain files and directories.
let NERDTreeIgnore=['\.git$', '\.jpg$', '\.mp4$', '\.ogg$', '\.iso$', '\.pdf$', '\.pyc$', '\.odt$', '\.png$', '\.gif$', '\.db$']
" }}}
" Various Settings{{{
" Set highlightsearch case insensitive and incremental and smartcase
set hls ic is smartcase
" Set line numbers
set number
" Use spaces instead of tabs
set expandtab
" Don't wrap lines but make them extend to the right
" set nowrap
" Enable copying to the system clipboard
set clipboard=unnamedplus
" }}}