-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswsvimrc_before_plugin_install.txt
94 lines (79 loc) · 1.87 KB
/
swsvimrc_before_plugin_install.txt
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
set hlsearch
set nu
set scrolloff=2
set wildmode=longest,list
set cindent
set bs=eol,start,indent
set history=256
set laststatus=2
set shiftwidth=4
set tabstop=4
set softtabstop=4
set paste
set showmatch
set smarttab
set smartindent
set noexpandtab
set ruler
set incsearch
set autoread
set autoindent
set autowrite
set exrc
set secure
" goto recent view point
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g'\"" |
\ endif
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Assuming that vundle is installed
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'L9'
" Almost essential
Plugin 'The-NERD-tree'
" C, CPP plugins
Plugin 'a.vim'
Plugin 'c.vim'
" YouCompleteMe
Plugin 'Valloric/YouCompleteMe'
" Optional. nice colorscheme
Plugin 'altercation/vim-colors-solarized'
call vundle#end()
filetype plugin indent on
" copy and paste
vmap <C-c> "+y
nmap <C-v> "+p
" YouCompleteMe code. <leader> is same to backslash
nmap <leader>g :YcmCompleter GoTo<CR>
nmap <leader>f :YcmCompleter FixIt<CR>
" NERDTree
nmap <F2> :NERDTreeToggle<CR>
imap <F2> <Esc>:NERDTreeToggle<CR>
" Default window size
nmap <F11> :set lines=30 columns=100<CR>
" C, CPP
au FileType c,cpp nmap <F3> :! g++ % -o ~/c/c_out
au FileType c,cpp nmap <F4> :! gnome-terminal -x sh -c '~/c/c_out && read continue && exit; exec bash'<CR>
" JAVA
au FileType java nmap <F3> :! javac %
au FileType java nmap <F4> :! java %<
au FileType java imap <leader>sysout System.out.println();<Esc>==$hi
au FileType java nmap <leader>sysout aSystem.out.println();<Esc>==$hi
au FileType java imap {<Enter> {<CR>}<Esc>ko
" PYTHON
au FileType python nmap <F3> :! python %
"au FileType python nmap <F3> :! python3 %
if has("gui_running")
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=L
"set lines=30 columns=100
"set guifont=Ubuntu\ Mono\ 13
else
endif