-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.local
147 lines (123 loc) · 4.79 KB
/
.vimrc.local
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
" set up vundle
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
Plugin 'gmarik/vundle'
" vundle github plugins
Plugin 'sjl/gundo.vim'
Plugin 'croaker/mustang-vim'
Plugin 'scrooloose/nerdcommenter'
"Plugin 'StanAngeloff/php.vim'
Plugin 'jacquesbh/vim-showmarks'
Plugin 'tomtom/checksyntax_vim'
Plugin 'ervandew/supertab'
Plugin 'cakebaker/scss-syntax.vim'
Plugin 'vim-scripts/jQuery'
"Plugin 'vim-scripts/SyntaxComplete'
Plugin 'othree/html5.vim'
Plugin 'majutsushi/tagbar'
Plugin 'tmhedberg/matchit'
Plugin 'ludovicPelle/vim-xdebug'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat'
Plugin 'wellle/targets.vim'
Plugin 'vim-scripts/Align'
Plugin 'ludovicchabant/vim-gutentags'
Plugin 'Shougo/vimproc.vim'
Plugin 'Shougo/unite.vim'
Plugin 'tpope/vim-sensible'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'duggiefresh/vim-easydir'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'jondkinney/dragvisuals.vim'
Plugin 'danro/rename.vim'
Plugin 'vim-scripts/Decho'
Plugin 'sirver/ultisnips'
Plugin 'tobyS/pdv'
Plugin 'tobyS/vmustache'
Plugin 'scrooloose/nerdtree'
Plugin 'bling/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'vim-scripts/ctags.vim--Johnson'
"react development
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'
Plugin 'w0rp/ale'
"""""""private settings"""""""
syntax on "enable syntax-hiliting
"""Sets"""
" Force 256 color terminal
set term=xterm-256color
set t_Co=256
set background=dark "let vim realise that the background is dark
set undofile " Allow to undo even after the files was closed
set undodir=~/.vim/undodir " Store the undodir here
set mouse=a " Mouse to the max
set number " Show linenumbers
set ruler " Show the line and column number of the cursor position, separated by a comma . Needed by the status-line
set cmdheight=2 " Command-space is 2 lines so tab-completion doesn't always jump around
set laststatus=2 " The last active window will be marked specially, even if there only exists one window
set scrolloff=3 " Minimal number of screen lines to keep above and below the cursor.
set showcmd " Show (partial) command in the last line of the screen
set incsearch " Incremental search - While typing a search command, show where the pattern, as it was typed so far, matches.
set ignorecase " Gross/Kleinschreibung ignorieren
set smartcase " Gross/Kleinschreibung nicht mehr ignorieren, sobald Grossbuchstaben vorkommen
set hlsearch " Highlight search matches
set visualbell " Flash the screen instead of beeping
set showmode " Show the current mode vim is in
set expandtab
set shiftwidth=2
set tabstop=2
set smarttab
set backspace=indent,eol,start " Allows backspace - over autoindent - over line breaks (join lines)- over the start of insert
set esckeys " Function keys that start with an <Esc> are recognized in Insert mode
" 'smarttab' 'sta' When on, a <Tab> in front of a line inserts blanks according to 'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places.
" A <BS> will delete a 'shiftwidth' worth of space at the start of the line.
set smarttab
set autoindent " Autoindent
set expandtab " Expand tabs to spaces
set showfulltag " When completing a word in insert mode (see ins-completion) from the tags file, show both the tag name and a tidied-up form of the search pattern (if there is one) as possible matches.
set noequalalways " Disabled setting high to equal for all remaining buffers after closing a buffer
set winminheight=0 " only show the status line of a file if minimized
"""mapping"""
" autofix the common q: misstype
map q: :q
" search with *( or # and then press M to replace the searched query
nmap <expr> M ':%s/' . @/ . '//g<LEFT><LEFT>'
vmap <expr> M ':s/' . @/ . '//g<LEFT><LEFT>'
" disable 'Entering Ex mode' in Vim
map Q <Nop>
" Tab goes down one window in normal mode
nnoremap <Tab> <C-w>w
" Shift+Tab goes up one window in normal mode
nnoremap <S-Tab> <C-w>W
" Make up/down-keys go up a visual line and not a code line
map <silent> ^[OB gj
map <silent> ^[OA gk
" Highlight spaces at the end of the line
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/
" Highlight tabs in order to find and eliminate them easier
syn match Tab " "
hi def Tab ctermbg=Blue
" Keep the selection when usinf < and >
vnoremap < <gv
vnoremap > >gv
" gp selects the previously pasted text
nnoremap gp `[v`]
" highlighting for bracket-matches
hi ShowPairsHL ctermbg=red ctermfg=white gui=bold guibg=#ffa000
hi ShowPairsHLPair ctermbg=red ctermfg=white gui=bold guibg=#ffa000 guifg=#ff0000
"""plugin customization and mapping"""
" NeRDComment
noremap <C-c> :call NERDComment(0, "toggle")<CR>
vnoremap <C-c> :call NERDComment(0, "toggle")<CR>gv
" Gundo
nnoremap <F10> :GundoToggle<CR>
" Powerline
let g:airline_powerline_fonts=1
let g:airline#extensions#syntastic#enabled = 1
let g:airline#extensions#tagbar#enabled = 1
" NERDTree
map <F9> :NERTreeToggle<CR>