More VIM improvements.

This commit is contained in:
Andrey Parhomenko 2022-10-11 19:52:39 +05:00
parent 1ac0b0d6a0
commit 3454d043a9
3 changed files with 8 additions and 0 deletions

1
.gitignore vendored
View file

@ -5,4 +5,5 @@ xsrf/cookies.txt
rcmain
user-dirs.dirs
dot/file/vim/pack
dot/file/vim/autoload

View file

@ -49,6 +49,8 @@ export_loop \
ANDROID_NDK_HOME '$HOME/app/android/ndk' \
GIT 'https://github.com/$USER' \
PATH '$HOME/exe:$HOME/.local/bin:$PATH' \
PERSONAL_SHELL 'sh' \
MYVIMRC '$HOME/.vimrc'\
test -r $SETENV && . "$SETENV" && setenv profile

View file

@ -1,4 +1,5 @@
" k1574's shitty vimrc.
" Mouse.
" In many terminal emulators the mouse works just fine.
" By enabling it you can position the cursor,
@ -68,6 +69,9 @@
cnoremap <Esc>b <S-Left>
cnoremap <Esc>f <S-Right>
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
" vimrc interaction.
nnoremap confe :e $MYVIMRC<CR>
nnoremap confr :source $MYVIMRC<CR>
" File types.
autocmd FileType javascript setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0
autocmd FileType javascriptreact setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0
@ -75,6 +79,7 @@
autocmd FileType css setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0
autocmd FileType html setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0
autocmd FileType htmldjango setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0
autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=0
" Jump to the last pos.
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler