blob: c710e4d1409cea6c16969f3acd927fe63cce596b (
plain)
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
" ▄▄ ▄▄ ▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄
" █ █ █ █ █ █▄█ █ ▄ █ █ █
" █ █▄█ █ █ █ █ █ █ █ █
" █ █ █ █ █▄▄█▄█ ▄▄█
" ▄▄▄ █ █ █ █ ▄▄ █ █
" █ █ █ ██ █ ██▄██ █ █ █ █ █▄▄
" █▄▄▄█ █▄▄▄█ █▄▄▄█▄█ █▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█
" Use System Clipboard
":set clipboard=unnamedplus
" ┌┐ ┌─┐┌─┐┬┌─┐ ┬─┐┬ ┬┌┐┌ ┌─┐┌─┐┌┬┐┌┬┐┌─┐┌┐┌┌┬┐┌─┐
" ├┴┐├─┤└─┐││ ├┬┘│ ││││ │ │ │││││││├─┤│││ ││└─┐
" └─┘┴ ┴└─┘┴└─┘ ┴└─└─┘┘└┘ └─┘└─┘┴ ┴┴ ┴┴ ┴┘└┘─┴┘└─┘
colorscheme tender
filetype plugin on
syntax on
set number
set relativenumber
set cursorline
:highlight Cursorline cterm=bold ctermbg=black
filetype indent on
set mouse=a
set hlsearch
set autochdir
" enable smartcase search sensitivity "
set ignorecase
set smartcase
" Indentation using spaces "
" tabstop: width of tab character
" softtabstop: fine tunes the amount of whitespace to be added
" shiftwidth: determines the amount of whitespace to add in normal mode
" expandtab: when on use space instead of tab
" textwidth: text wrap width
" autoindent: autoindent in new line
set tabstop =4
set softtabstop =4
set shiftwidth =4
" set textwidth =79
set expandtab
set autoindent
" show the matching part of pairs [] {} and () "
set showmatch
" remove trailing whitespace from Python and Fortran files "
autocmd BufWritePre *.py :%s/\s\+$//e
autocmd BufWritePre *.f90 :%s/\s\+$//e
autocmd BufWritePre *.f95 :%s/\s\+$//e
autocmd BufWritePre *.for :%s/\s\+$//e
if has('gui_running')
set t_Co=256
set guifont=Roboto\ Mono\ 11
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=L
colorscheme tender
endif
" enable true colors support "
set termguicolors
if $TERM == 'alacritty'
set ttymouse=sgr
endif
" ╦╔═┌─┐┬ ┬┌┐ ┬┌┐┌┌┬┐┌─┐ ┌─┐┌─┐┬─┐ ═╗ ╦ ╔═╗┬ ┬┌─┐┌┐ ┌─┐┌─┐┬─┐┌┬┐
" ╠╩╗├┤ └┬┘├┴┐││││ ││└─┐ ├┤ │ │├┬┘ ╔╩╦╝ ║ │ │├─┘├┴┐│ │├─┤├┬┘ ││
" ╩ ╩└─┘ ┴ └─┘┴┘└┘─┴┘└─┘ └ └─┘┴└─ ╩ ╚═ ╚═╝┴─┘┴┴ └─┘└─┘┴ ┴┴└──┴┘
vnoremap <C-c> "+y
vmap <C-x> "+x
map <C-p> "+p
map <Leader>p "+P
" Vertical Motions Mappings
nnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz
nnoremap n nzzzv
nnoremap N Nzzzv
" NERDTree Keybinds
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
" ╔═╗┬ ┬ ┬┌─┐┬┌┐┌ ╔╦╗┌─┐┌┐┌┌─┐┌─┐┌─┐┬─┐
" ╠═╝│ │ ││ ┬││││ ║║║├─┤│││├─┤│ ┬├┤ ├┬┘
" ╩ ┴─┘└─┘└─┘┴┘└┘ ╩ ╩┴ ┴┘└┘┴ ┴└─┘└─┘┴└─
call plug#begin()
Plug 'https://github.com/preservim/nerdtree', { 'on': 'NERDTreeToggle' }
" Plug 'LunarWatcher/auto-pairs'
Plug 'tmsvg/pear-tree'
Plug 'https://github.com/adelarsq/vim-matchit'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'tpope/vim-surround'
Plug 'junegunn/fzf'
call plug#end()
" Use a line cursor within insert mode and a block cursor everywhere else.
"
" Reference chart of values:
" Ps = 0 -> blinking block.
" Ps = 1 -> blinking block (default).
" Ps = 2 -> steady block.
" Ps = 3 -> blinking underline.
" Ps = 4 -> steady underline.
" Ps = 5 -> blinking bar (xterm).
" Ps = 6 -> steady bar (xterm).
let &t_SI = "\e[6 q"
let &t_EI = "\e[2 q"
" Fix the cursor change timeout between insert and normal mode (see function
" above)
"
"
set ttimeout
set ttimeoutlen=1
set listchars=tab:>-,trail:~,extends:>,precedes:<,space:.
set ttyfast
" Tab Autocompletion for COC NVIM
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
inoremap <silent><expr> <Tab>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
" COC.NVIM colors
highlight CocFloating ctermbg=0
highlight CocErrorFloat ctermfg=15
" Customize split dividers
set fillchars+=vert:\█
set fillchars+=fold:\█
set fillchars+=diff:\█
set fillchars+=stl:\=
set fillchars+=stlnc:\=
set fillchars+=stl:\=
highlight VertSplit ctermfg=235 guifg=#3c3836
highlight StatusLine ctermfg=black ctermbg=lightgray
highlight StatusLineNC ctermfg=darkgray ctermbg=lightgray
highlight LineNr guifg=darkgray ctermfg=darkgray
highlight CursorLineNr guifg=cyan ctermfg=cyan
|