-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_vimrc
More file actions
216 lines (169 loc) · 6.08 KB
/
Copy path_vimrc
File metadata and controls
216 lines (169 loc) · 6.08 KB
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
" VIM Konfiguration Datei
" J. Erik Heinz"
" Villeicht interessant:
" http://cscope.sourceforge.net/cscope_vim_tutorial.html
let mapleader = '-'
" http://learnvimscriptthehardway.stevelosh.com/chapters/06.html
let maplocalleader = ','
set noerrorbells
" Globale einstellungen für Tabstop und shiftwidth
set tabstop=4
set sw=4
" Visuelles Klingeln anstat normales piepen
set visualbell
" Automatisches einrücken
set autoindent
" autowrite: Automatically save modifications to files
" when you use critical (rxternal) commands.
set autowrite
" backspace: '2' allows backspacing" over
" indentation, end-of-line, and start-of-line.
" see also "help bs".
set backspace=2
" esckeys: allow usage of cursor keys within insert mode
" You will find this useful when working, eg, on SunOS.
set esckeys
" hidden: Allow "hidden" buffers. A must-have!
set hidden
" hlsearch : highlight search - show the current search pattern
" This is a nice feature sometimes - but it sure can get in the
" way sometimes when you edit.
set nohlsearch
" ignorecase: ignore the case in search patterns? NO!
set noignorecase
" Color of the search
" GUI
hi Search guibg=cyan guifg=black
" Terminal
hi Search cterm=NONE ctermfg=black ctermbg=cyan
" laststatus: show status line? Yes, always!
" laststatus: Even for only one buffer.
set laststatus=2
" magic: Use 'magic' patterns (extended regular expressions)
" in search patterns? Certainly! (I just *love* "\s\+"!)
set magic
" modeline: ...
" Allow the last line to be a modeline - useful when
" the last line in sig gives the preferred textwidth for replies.
set modeline
set modelines=1
" ruler: show cursor position? Yep!
set ruler
" number: Zeilennummer: nein
set nonumber
" showcmd: Show current uncompleted command? Absolutely!
set showcmd
" showmatch: Show the matching bracket for the last ')'?
set showmatch
" showmode: Show the current mode? YEEEEEEEEESSSSSSSSSSS!
set showmode
" 2016-11-02 http://unix.stackexchange.com/questions/23389/how-can-i-set-vims-default-encoding-to-utf-8
"set fileencoding=utf-8
" 2016-12-19 http://stackoverflow.com/questions/41186370/vim-displays-content-of-file-with-signs
:set encoding=utf-8
" splitbelow: Create new window below current one.
set splitbelow
"
" statusline: customize contents of the windows' status line.
" I prefer it this way:
" Show the current buffer number and filename with info on
" modification, read-only, and whether it is a help buffer
" (show only when applied).
" set statusline=[%n]\ %f\ %(\ %M%R%H)%)
" set statusline=[%n]\ %f\ %(\ %M%R%H)%)\=Pos=<%l\,%c%V>\ %P\=ASCII=%b\ HEX=%B)%=(c)\ Michael\ Prokop
" Meine favorisierte statusline:
set statusline=%<[%n]\%f\%y\%r\%1*%m%*%w%=%(Spalte:\%c%V%)%4(%)%-10(Zeile:\%l%)\%4(%)%p%%\%P\ \ \ \ ASCII=%b\ HEX=%B\ \ \ \ \ [jerik]
" ttyscroll: turn off scrolling -> faster!
set ttyscroll=0
" whichwrap:
" Allow jump commands for left/right motion to wrap to previous/next
" line when cursor is on first/last character in the line:
set whichwrap=<,>,h,l,[,]
" wrapmargin:
" When do you want the line to break? A value of 1 means that 1
" "cursor" before the end of the visible screen.
" if wrapmargin=n, then the wrapping occurs if the distance to the
" right screen-border is "n" spaces
set wrapmargin=1
" Run the after ftplugin on startup"
filetype plugin on
" Swapfiles nicht ins gleich verzeichnis schreiben, sondern in ein spezielles
if has( "win32" )
set dir=C:\swps
else
set dir=/usr/swps
endif
"Viki settings:"
" this is in iso-latin-1
let g:vikiLowerCharacters = "a-zäöüßáàéèíìóòçñ"
let g:vikiUpperCharacters = "A-ZÄÖÜ"
"Add the Wiki suffix to an vikiword. means OtherIdea links to OtherIdea.txt"
let g:vikiUseParentSuffix = 1
" jerik: 20141006 http://stackoverflow.com/a/680271/1933185
" copy paste with system clipboard on Windows
" set clipboard=unnamed
" jerik: 20141020
" see :Tweak # looks interesting let's try :)
" better colorschema"
"color jerik
" Fullscreen when opening vim # for winwos
" http://unix.stackexchange.com/questions/40047/vim-script-check-running-platform
if has( "win32" )
au GUIEnter * simalt ~x
endif
"Rails configuraiton - 2006-07-13 "
"see: :h rails"
"autocmd User Rails* Lcd
"let g:rails_level=4
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" 20170222 set font for graphical vim, to support EUR sign"
" http://www.troubleshooters.com/linux/vifont.htm
set gfn=DejaVu_Sans_Mono:h11:cANSI
" Projects notes mit neuer Syntax versehen
au BufRead,BufNewFile *.log set filetype=plog
" jerik 20141014
" Realod listed files if they are saved
" http://www.bestofvim.com/tip/auto-reload-your-vimrc/
" augroup reload_vimrc "{
" autocmd!
" autocmd BufWritePost $MYVIMRC so $MYVIMRC
" augroup "}
" jerik 20141014
" DOES NOT WORK
" http://stackoverflow.com/questions/11068128/how-to-disable-vim-autocomplete-popup-for-plain-text-files
" autocmd WinEnter * :if &ft=='vim' | DisableAcp | else | EnableAcp | endif
" jerik 20141014
" @todo Do I need the tweak.vim or merge into .vimrc?
" Rehash: Reload my vim configuration files"
function! Rehash()
:so $HOME/vimfiles/plugin/tweak.vim
:so $HOME/vimfiles/plugin/sandbox.vim
echom "Reloaded tweak.vim, sandbox.vim"
endfunction
command! Rehash :call Rehash()
filetype plugin indent on " Required!
" https://github.com/junegunn/vim-plug/wiki/faq
" @todo Better Javascript: " https://oli.me.uk/2013/06/29/equipping-vim-for-javascript/
" @todo vimfiles should be a variable which is .vim or vimfiles, based on the OS
call plug#begin('~/vimfiles/plugged')
""Plug 'junegunn/seoul256.vim'
""Plug 'junegunn/goyo.vim'
""Plug 'junegunn/limelight.vim'
Plug 'jelera/vim-javascript-syntax'
Plug 'Raimondi/delimitMate'
Plug 'pangloss/vim-javascript'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'krisajenkins/vim-pipe'
" https://github.com/garbas/vim-snipmate
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
" Optional:
Plug 'honza/vim-snippets'
call plug#end()
" to install plugins, reload .vimrc and run PlugInstall in normal mode