vim-settings/vim/dot_vimrc

79 lines
1.5 KiB
Plaintext
Raw Normal View History

2012-04-24 14:09:19 +00:00
"Allow arrow keys
set nocompatible
2012-03-29 03:18:33 +00:00
"tab functionality
"tabs inserted as 4 spaces
"backspace deletes all spaces
"autoindent enabled
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
filetype indent on
2012-04-24 14:09:19 +00:00
set virtualedit=onemore " allow for cursor beyond last character
set scrolljump=5 " lines to scroll when cursor leaves screen
set scrolloff=3 " minimum lines to keep above and below cursor
"Enable search highlighting
set hls
"Highlights the line the cursor is on
set cursorline
2012-03-29 03:18:33 +00:00
"enable line numbers
set nu
2012-04-24 14:09:19 +00:00
"Toggle Line numbers with Ctrl+N double tap
nmap <C-N><C-N> :set invnumber<CR>
"Toggle line wrap with Ctrl+L double tap
nmap <C-L><C-L> :set wrap!<CR>
2012-03-29 03:18:33 +00:00
"Allows filetype detection
filetype on
"editing multiple files
"Ctrl+j maximizes split below
"Ctrl+k maximizes split above
"allows size 0 splits
"map <C-J> <C-W>j<C-W>_
"map <C-K> <C-W>k<C-W>_
"set wmh=0
2012-04-24 14:09:19 +00:00
"Move between splits using Ctrl+hjkl
2012-03-29 03:18:33 +00:00
map <C-k> <C-w>k
map <C-j> <C-w>j
map <C-l> <C-w>l
map <C-h> <C-w>h
2012-04-24 14:09:19 +00:00
"CTags List
2012-03-29 03:18:33 +00:00
nnoremap <silent> <F8> :TlistToggle<CR>
let Tlist_Exit_OnlyWindow=1
let Tlist_Winwidth=30
"Syntax Hightlighting
syntax on
"Remap jk to esc
inoremap jk <esc>
2012-04-24 14:09:19 +00:00
"Remap Ctrl+Space for auto Complete
inoremap <C-Space> <C-n>
inoremap <Nul> <C-n>
" Stupid shift key fixes
cmap W w
cmap WQ wq
cmap wQ wq
cmap Q q
"clearing highlighted search
nmap <silent> <leader>/ :nohlsearch<CR>
" Change Working Directory to that of the current file
cmap cwd lcd %:p:h
cmap cd. lcd %:p:h