-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc_qtcreator
104 lines (94 loc) · 3.09 KB
/
vimrc_qtcreator
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
" PERSONAL SETTINGS
"
set autoindent "indent if previous line is indented
set number "set line numbering
set relativenumber "set relative line numbering
set ls=2 "always show the status line
set ruler "show cursor position in status bar
set background=dark "better readability
set ignorecase "search options
set smartcase "ignore case if search pattern is all lc, case-sensitive otherwise
set incsearch
set hlsearch "highlight search patterns; escape with ...
set showcmd " show incomplete cmds at the bottom
set showmode " show current mode at the bottom
set tabstop=4
set expandtab "convert tabs to whitespace
set softtabstop=4 "tab key indent
set shiftwidth=4 "autoindent width
set backspace=2 "stop weird backspace behavior
set cursorline "highlight current line
set textwidth=79 "automatic line break after 79 chars
set fileformat=unix "avoid conversion issues
set encoding=utf-8 "set encoding, useful for python3
set nowrap "don't wrap long line
set colorcolumn=81 "Show end of long line
set hidden " allows making buffers hidden even without unsaved changes
set history=1000 "remember more commands and search history
set autoread "autoread when a file is changed from the outside
set mouse=a "enables the mouse in all modes
let mapleader=" "
" key mappings for switching between multiple windows
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
map Y y$
map ß $
noremap , ;
noremap ; ,
" disable arrow keys
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" add closing brackets
"inoremap { {}<Esc>i
"inoremap [ []<Esc>i
noremap <leader>c :cc<CR>
noremap <leader>n :cn<CR>
noremap <leader>p :cp<CR>
noremap <leader>cl :cclose<CR>
noremap <leader>co :copen<CR>
"
" MY VIM KEYMAPPINGS
"
" F1
" F2 c | toggle NerdTreeWindow
" F3 c | toggle TagBar
" F4 c | switch between .c* and .h* files
" F5 c | execute/compile and execute
" F6 c | jump to error
" F7 c | update ctags
" F8
" F9
" F10
" F11
" F12 c | pastetoggle
"
" C-a d | n: increment number under cursor, i: insert text written most recently
" C-b d | move one page up
" C-c d | interrupt
" C-d d | move half-page down
" C-e d | scroll downwards, current line at the top
" C-f d | move one page down
" C-g d | display filename, current and total line number etc
" C-h c | move to window on the left
" C-i c | open function definition under cursor in new hor. split window
" C-j c | move to window below
" C-k c | move to window above
" C-l c | move to window to the right
" C-m d | FUTILE (inserts new line)
" C-n c | FUTILE (insert next matching word) or used for UltiSnips?
" C-o d | jump to previous cursor position
" C-p d | insert previous matching word
" C-q d | uncomment current line
" C-r d | redo (undo the undo)
" C-s c | comment current line
" C-t c | move back to place of function call (reverse C-z)
" C-u d | move half-page up
" C-v c | start visual block mode
" C-w c | prefix for window switching commands
" C-x c | decrement number
" C-y d | scroll upwards, current line at the bottom
" C-z c | go to function definition under cursor (using ctags)