-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
167 lines (121 loc) · 4.38 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
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
157
158
159
160
161
162
163
164
165
166
set mouse=a
set laststatus=2
" Use Ctrl+Enter to select suggestions in insert mode
inoremap <C-Enter> <C-x><C-o>
" Use Enter to select suggestions or add a new line in insert mode
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
" Set the runtime path for Vundle
set rtp+=~/.vim/bundle/Vundle.vim
" Initialize Vundle
call vundle#begin()
" Add coc.nvim to the list of plugins
Plugin 'neoclide/coc.nvim', {'branch': 'release'}
" Enable coc.nvim
let g:coc_global_extensions = ['coc-clangd', 'coc-python', 'coc-json']
Plugin 'kana/touchui'
" ... Other Vim configurations ...
" End Vundle
call vundle#end()
call plug#begin()
" The default plugin directory will be as follows:
" - Vim (Linux/macOS): '~/.vim/plugged'
" - Vim (Windows): '~/vimfiles/plugged'
" - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
" You can specify a custom plugin directory by passing it as the argument
" - e.g. `call plug#begin('~/.vim/plugged')`
" - Avoid using standard Vim directory names like 'plugin'
" Make sure you use single quotes
Plug 'vim-scripts/vimtap'
" On-demand loading
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-default branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Initialize plugin system
" - Automatically executes `filetype plugin indent on` and `syntax enable`.
call plug#end()
set number
set relativenumber
set autoindent
filetype indent on
syntax on
set wildmenu
set wildmode=list:longest
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
" Initialzing plug
call plug#begin('~/.vim/plugged')
Plug 'csexton/trailertrash.vim'
call plug#end()
" Map a key to run Betty style checker
map <F2> :!betty %<CR>
" Map a key to run TrailerTrash
nnoremap <F4> :TrailerTrim<CR>
" Map F3 to select entire buffer and reformat
nnoremap <F3> :%norm! ggVG=<CR>
" Compile via vim
function! Compile()
let source_filename = expand('%')
let number = matchstr(source_filename, '\d\+')
let test_filename = number . '-main.c'
let output_filename = substitute(source_filename, '\.c$', '', '')
let command = 'gcc -Wall -pedantic -Werror -Wextra -std=gnu89 _putchar.c ' . source_filename . ' ' . test_filename . ' -o ' . output_filename
execute '!'.command
endfunction
command! -nargs=0 Compile :call Compile()
nnoremap <F5> :Compile<CR>
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
" Initialzing plug
call plug#begin('~/.vim/plugged')
Plug 'csexton/trailertrash.vim'
call plug#end()
" Map a key to run Betty style checker
map <F2> :!betty %<CR>
" Map a key to run TrailerTrash
nnoremap <F4> :TrailerTrim<CR>
" Map F3 to select entire buffer and reformat
nnoremap <F3> :%norm! ggVG=<CR>
" Compile via vim
function! Compile()
let source_filename = expand('%')
let number = matchstr(source_filename, '\d\+')
let test_filename = number . '-main.c'
let output_filename = substitute(source_filename, '\.c$', '', '')
let command = 'gcc -Wall -pedantic -Werror -Wextra -std=gnu89 _putchar.c ' . source_filename . ' ' . test_filename . ' -o ' . output_filename
execute '!'.command
endfunction
command! -nargs=0 Compile :call Compile()
nnoremap <F5> :Compile<CR>
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
" Initialzing plug
call plug#begin('~/.vim/plugged')
Plug 'csexton/trailertrash.vim'
call plug#end()
" Map a key to run Betty style checker
map <C-b> :!betty %<CR>
" Map a key to run TrailerTrash
nnoremap <F4> :TrailerTrim<CR>
" Map F3 to select entire buffer and reformat
nnoremap <F3> :%norm! ggVG=<CR>
" Compile via vim
function! Compile()
let source_filename = expand('%')
let number = matchstr(source_filename, '\d\+')
let test_filename = number . '-main.c'
let output_filename = substitute(source_filename, '\.c$', '', '')
let command = 'gcc -Wall -pedantic -Werror -Wextra -std=gnu89 _putchar.c ' . source_filename . ' ' . test_filename . ' -o ' . output_filename
execute '!'.command
endfunction
command! -nargs=0 Compile :call Compile()
nnoremap <F5> :Compile<CR>
" Use vim-plug for managing plugins (if you're using Vim-Plug)
call plug#begin('~/.vim/plugged')
" Plugin for Python linting
Plug 'vim-syntastic/syntastic'
call plug#end()
" Enable syntax checking
syntax enable
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" Map a shortcut key to run the linter
nmap <C-c> :SyntasticCheck<CR>