From: Jannik ZANDER Date: Thu, 19 Jul 2018 07:02:12 +0000 (+0200) Subject: Add autohotscript X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=be9e47a099e55042282b482347a3586773cab8ff;p=dotfiles.git Add autohotscript --- diff --git a/.vim/vimrc b/.vim/vimrc index a503ee9..43be7c6 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -25,13 +25,13 @@ set smartcase set showmatch set complete-=i set virtualedit=block -set pastetoggle=p if has('unnamedplus') set clipboard=unnamed,unnamedplus endif " display set scrolloff=1 +set scrolljump=5 set sidescrolloff=5 set display+=lastline set lazyredraw @@ -52,8 +52,8 @@ set backspace=indent,eol,start set ttimeoutlen=10 set winaltkeys=no set noerrorbells -set visualbell t_vb= -let mapleader = "," +set novisualbell +set t_vb= " command/status line set showmode @@ -97,16 +97,12 @@ if has("win32") set shell=cmd set shellcmdflag=/c endif -set fileformats=unix,dos,mac -set fileignorecase - -" Encoding set encoding=utf-8 set fileencoding=utf-8 -set fileencodings=utf-8 -set bomb -set binary -set ttyfast +set fileencodings=utf-8,latin1,unicode +set fileformat=unix +set fileformats=unix,dos,mac +set fileignorecase " colors set t_Co=256 @@ -126,18 +122,20 @@ let &t_SI.="\e[5 q" let &t_EI.="\e[1 q" let &t_te.="\e[0 q" -" grep -" file:line:coloumn:message -set grepformat^=%f:%l:%c:%m -set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc -nnoremap * :grep \| copen +let mapleader = "," +set pastetoggle=p -" Netrw +" Netrw (buildin) let g:netrw_liststyle=3 let g:netrw_banner = 0 let g:netrw_sort_sequence = '[\/]$,*' -" Packages +" grep (buildin) +" file:line:coloumn:message +set grepformat^=%f:%l:%c:%m +set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc +nnoremap * :grep \| copen +" plugins " Airline packadd! vim-airline diff --git a/bin/caps-hjkl-or-esc.ahk b/bin/caps-hjkl-or-esc.ahk new file mode 100644 index 0000000..550eba3 --- /dev/null +++ b/bin/caps-hjkl-or-esc.ahk @@ -0,0 +1,31 @@ +#NoEnv +SendMode Input + +; Disable default CapsLock functionality +SetCapsLockState, AlwaysOff + +; Post Esc if pressed alone +CapsLock:: + + ; If you want to override CapsLock functionality for specific windows, etc. + ; Just define an OverrideCapsLock() function where you #include this script! + OverrideFunction := "OverrideCapsLock" + + ; Call the function dynamically to allow for silent failure. + if (Overridden := %OverrideFunction%()) { + Send {%Overridden%} + return + } + + KeyWait, CapsLock + if (A_PriorKey="CapsLock") + Send {Esc} +return + +; Map CapsLock modified hjkl movement +#If, GetKeyState("CapsLock", "P") +h::Left +j::Down +k::Up +l::Right +#If