a lot of new niecties from a previous vimrc
This commit is contained in:
40
vimrc
40
vimrc
@@ -6,6 +6,15 @@ set confirm
|
|||||||
" prevent the 'no write since last change' message when changing buffers
|
" prevent the 'no write since last change' message when changing buffers
|
||||||
set hidden
|
set hidden
|
||||||
|
|
||||||
|
"-- Find --
|
||||||
|
set path=** "set find path to current directory
|
||||||
|
set suffixesadd=.py,.html,.css,.js,.scss,.less "add sufixes so you don't have to type whole filenames
|
||||||
|
|
||||||
|
"-- Autocomplete on command mode --
|
||||||
|
set wildmode=full "autocomplete filenames, help, etc.
|
||||||
|
set wildmenu "shows autocomplete options in a nice menu list
|
||||||
|
set wildignore=*.swp,*.bak,*.pyc "ignore certain file types in autocompletion
|
||||||
|
|
||||||
" Reopen the last edited position in files
|
" Reopen the last edited position in files
|
||||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
|
|
||||||
@@ -21,10 +30,41 @@ set relativenumber
|
|||||||
" four-space tabs
|
" four-space tabs
|
||||||
filetype indent plugin on
|
filetype indent plugin on
|
||||||
set smartindent
|
set smartindent
|
||||||
|
set autoindent
|
||||||
|
|
||||||
|
set title " set the terminal title
|
||||||
|
set ruler "show status line
|
||||||
|
set rulerformat=%10(%l,%c%V%)
|
||||||
|
set laststatus=2 "always show status line
|
||||||
|
set cursorline "highlight current line
|
||||||
|
|
||||||
|
set ignorecase "case-insensitive search
|
||||||
|
set smartcase "unless there's an uppercase letter in the keyword
|
||||||
|
|
||||||
setlocal shiftwidth=2 softtabstop=2 expandtab
|
setlocal shiftwidth=2 softtabstop=2 expandtab
|
||||||
au FileType python setl softtabstop=4 shiftwidth=4 tabstop=4
|
au FileType python setl softtabstop=4 shiftwidth=4 tabstop=4
|
||||||
|
|
||||||
|
" toggle paste mode
|
||||||
|
map <Leader>p :set invpaste<CR>
|
||||||
|
|
||||||
|
" keep visual selection after indenting
|
||||||
|
vnoremap < <gv
|
||||||
|
vnoremap > >gv
|
||||||
|
|
||||||
|
" easier completion mode
|
||||||
|
imap <c-k> <c-x>
|
||||||
|
|
||||||
|
" quick way to escape insert mode
|
||||||
|
inoremap kj <ESC>
|
||||||
|
inoremap <S-Space> <ESC>
|
||||||
|
|
||||||
|
" make <tab> jump you to the matching bracket in normal or visual modes
|
||||||
|
nnoremap <tab> %
|
||||||
|
vnoremap <tab> %
|
||||||
|
|
||||||
|
" easier way to get to beginning end of line
|
||||||
|
map H ^
|
||||||
|
map L $
|
||||||
let mapleader = "\<Space>"
|
let mapleader = "\<Space>"
|
||||||
|
|
||||||
" toggle comment
|
" toggle comment
|
||||||
|
|||||||
Reference in New Issue
Block a user