Last active
June 9, 2023 18:51
-
-
Save jan-vandenberg/e00aee4e3a02356d624a11e90301199a to your computer and use it in GitHub Desktop.
.vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set nocompatible | |
" Fast finger fixes | |
command W w | |
command Wq wq | |
command WQ wq | |
" Start where you left off | |
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif | |
filetype plugin indent on | |
set expandtab " Tabs are converted to spaces | |
set tabstop=4 " Tabs are foure spaces (columns) | |
set shiftwidth=4 " Shift four columns | |
"set t_ti= t_te= " When quitting vim see buffer in terminal | |
set fileencodings=utf-8 " UTF-8 all the things | |
set showmatch " Show matching brackets. | |
set ignorecase " Do case insensitive matching | |
set incsearch " Incremental search | |
set hlsearch " Highlight all search results | |
set autochdir | |
colorscheme molokai " My fave | |
"let g:rehash256 = 1 | |
" Always do correct pasting (no weird indenting while pasting) | |
let &t_SI .= "\<Esc>[?2004h" | |
let &t_EI .= "\<Esc>[?2004l" | |
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin() | |
function! XTermPasteBegin() | |
set pastetoggle=<Esc>[201~ | |
set paste | |
return "" | |
endfunction | |
"This is for tmux to work correctly | |
"set term=screen-256color | |
"set background=dark | |
nnoremap j gj | |
nnoremap k gk | |
"iab <expr> dts strftime("\%Y-\%m-\%d \%H:\%M:\%S") | |
"https://unix.stackexchange.com/questions/111558/how-can-i-constantly-see-the-current-filename-in-vim | |
set laststatus=2 | |
"https://news.ycombinator.com/item?id=34310454 | |
"set scrolloff=50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment