Compare commits
2 Commits
5694212d33
...
ddab650076
| Author | SHA1 | Date | |
|---|---|---|---|
| ddab650076 | |||
| f50d4b3abe |
70
vimrc
Normal file
70
vimrc
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
" Tempfile directory "
|
||||||
|
set directory^=$HOME/.vim/tmp//
|
||||||
|
|
||||||
|
" do not copy line numbers with mouse
|
||||||
|
" set mouse+=a
|
||||||
|
|
||||||
|
" highlight search results "
|
||||||
|
set hlsearch
|
||||||
|
|
||||||
|
" ignore case when searching
|
||||||
|
set ignorecase
|
||||||
|
|
||||||
|
" 7 lines before the cursor when moving
|
||||||
|
set so=7
|
||||||
|
|
||||||
|
" auto-read outside file changes
|
||||||
|
set autoread
|
||||||
|
|
||||||
|
" :W sudo saves the file (good for permission denied)
|
||||||
|
command W w !sudo tee % > /dev/null
|
||||||
|
|
||||||
|
" 1 tab == 4 spaces "
|
||||||
|
set expandtab
|
||||||
|
set smarttab
|
||||||
|
set shiftwidth=4
|
||||||
|
set tabstop=4
|
||||||
|
|
||||||
|
" Color scheme "
|
||||||
|
try
|
||||||
|
colorscheme desert
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
|
|
||||||
|
|
||||||
|
" white line numbers "
|
||||||
|
set number
|
||||||
|
highlight LineNr ctermfg=white ctermbg=darkgrey
|
||||||
|
|
||||||
|
|
||||||
|
" reload file with F5 key, remove unnecessary white with F6
|
||||||
|
nnoremap <F6> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
|
||||||
|
nnoremap <F5> :checktime<CR>
|
||||||
|
|
||||||
|
" more pleasant ruler color
|
||||||
|
:hi ColorColumn guibg=lightgreen ctermbg=lightgreen
|
||||||
|
|
||||||
|
" python settings
|
||||||
|
augroup python
|
||||||
|
au!
|
||||||
|
autocmd FileType python set colorcolumn=120
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
" format the status line
|
||||||
|
set laststatus=2
|
||||||
|
hi StatusLine ctermbg=white ctermfg=darkgrey
|
||||||
|
set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
|
||||||
|
|
||||||
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||||
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||||
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||||
|
endif
|
||||||
|
|
||||||
|
call plug#begin()
|
||||||
|
Plug 'tpope/vim-sensible'
|
||||||
|
Plug 'scrooloose/nerdcommenter'
|
||||||
|
|
||||||
|
" On-demand loading
|
||||||
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||||
|
call plug#end()
|
||||||
Reference in New Issue
Block a user