More VIM improvements.
This commit is contained in:
parent
1ac0b0d6a0
commit
3454d043a9
3 changed files with 8 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,4 +5,5 @@ xsrf/cookies.txt
|
||||||
rcmain
|
rcmain
|
||||||
user-dirs.dirs
|
user-dirs.dirs
|
||||||
dot/file/vim/pack
|
dot/file/vim/pack
|
||||||
|
dot/file/vim/autoload
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,8 @@ export_loop \
|
||||||
ANDROID_NDK_HOME '$HOME/app/android/ndk' \
|
ANDROID_NDK_HOME '$HOME/app/android/ndk' \
|
||||||
GIT 'https://github.com/$USER' \
|
GIT 'https://github.com/$USER' \
|
||||||
PATH '$HOME/exe:$HOME/.local/bin:$PATH' \
|
PATH '$HOME/exe:$HOME/.local/bin:$PATH' \
|
||||||
|
PERSONAL_SHELL 'sh' \
|
||||||
|
MYVIMRC '$HOME/.vimrc'\
|
||||||
|
|
||||||
test -r $SETENV && . "$SETENV" && setenv profile
|
test -r $SETENV && . "$SETENV" && setenv profile
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
" k1574's shitty vimrc.
|
" k1574's shitty vimrc.
|
||||||
|
|
||||||
" Mouse.
|
" Mouse.
|
||||||
" In many terminal emulators the mouse works just fine.
|
" In many terminal emulators the mouse works just fine.
|
||||||
" By enabling it you can position the cursor,
|
" By enabling it you can position the cursor,
|
||||||
|
@ -68,6 +69,9 @@
|
||||||
cnoremap <Esc>b <S-Left>
|
cnoremap <Esc>b <S-Left>
|
||||||
cnoremap <Esc>f <S-Right>
|
cnoremap <Esc>f <S-Right>
|
||||||
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
||||||
|
" vimrc interaction.
|
||||||
|
nnoremap confe :e $MYVIMRC<CR>
|
||||||
|
nnoremap confr :source $MYVIMRC<CR>
|
||||||
" File types.
|
" File types.
|
||||||
autocmd FileType javascript setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0
|
autocmd FileType javascript setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0
|
||||||
autocmd FileType javascriptreact 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 css setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0
|
||||||
autocmd FileType html 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 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.
|
" Jump to the last pos.
|
||||||
" When editing a file, always jump to the last known cursor position.
|
" 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
|
" Don't do it when the position is invalid or when inside an event handler
|
||||||
|
|
Loading…
Reference in a new issue