Browse Source

Remove Enter mapping for Vim & other Vim settings

- increase timeoutlen
- fix F10 paste for Neovim
- escape url mapping (for LaTeX)

Also added pdftojpg function.
red-hat-laptop
Kevin Mok 7 years ago
parent
commit
a4d1cd0776
  1. 13
      aliases/zsh_aliases
  2. 1
      configs/NZXT/i3/config
  3. 1
      configs/NZXT/ranger/rc.conf
  4. 1
      configs/NZXT/ranger/scope.sh
  5. 11
      dotfiles/vimrc

13
aliases/zsh_aliases

@ -87,6 +87,7 @@ alias tm="ni $usnp_dir/texmath.snippets"
# }}} config files #
# applications {{{ #
alias rg="ranger"
function ok() { okular $1 ; }
function chr() { google-chrome $1 ; }
function ni() { nvim $1 ; }
@ -172,6 +173,18 @@ if [ "$(hostname)" = "NZXT" ]; then
alias cvf="f ~/Documents/resume/examples/cv"
alias vcv="ni ~/Documents/resume/examples/cv.tex"
alias okcv="ok ~/Documents/resume/examples/cv.pdf"
# https://stackoverflow.com/a/6605085/8811872
function pdftojpg() {
convert \
-verbose \
-density 150 \
-trim \
$1.pdf \
-quality 100 \
-flatten \
-sharpen 0x1.0 \
$1.jpg
}
# }}} resume #
# }}} various coding projs #

1
configs/NZXT/i3/config

@ -134,7 +134,6 @@ bindsym $mod+F3 workspace $ws3; exec google-chrome
set $ws4 "4 "
workspace $ws4 output $samsung
assign [class="Okular"] $ws4
set $ws5 "5 "
workspace $ws5 output $benq

1
configs/NZXT/ranger/rc.conf

@ -347,6 +347,7 @@ map <DOWN> move down=1
map <LEFT> move left=1
map <RIGHT> move right=1
map <HOME> move to=0
map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True

1
configs/NZXT/ranger/scope.sh

@ -61,6 +61,7 @@ handle_extension() {
pdf)
# Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - && exit 5
# pdftoppm -jpeg -singlefile "$path" "${cached//.jpg}" && exit 6 || exit 1;;
exiftool "${FILE_PATH}" && exit 5
exit 1;;

11
dotfiles/vimrc

@ -19,7 +19,7 @@ set linespace=5
" set list
" set cursorcolumn
" set cursorline
set timeoutlen=300
set timeoutlen=500
set hlsearch
" }}} set x=y "
@ -104,6 +104,9 @@ Plug 'dkarter/bullets.vim'
" coordinate Vim color scheme with terminal color scheme
Plug 'dylanaraps/wal.vim'
" repeat plugin commands
Plug 'tpope/vim-repeat'
call plug#end()
" colorscheme gotham256
@ -117,12 +120,12 @@ colorscheme wal
map <F3> :wa<CR>
map <F4> :wqa<CR>
map <F5> :qa!<CR>
map <F6> :make -C ~/Documents/resume cv<CR>
map <F7> :AutoSaveToggle<CR>
map <F9> :LLPStartPreview<CR>
nnoremap <F10> :set paste<CR>p:set nopaste<CR>
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
" }}} function keys "
map <Enter> o<ESC>
map <S-Enter> O<ESC>
" splits {{{ "
@ -168,6 +171,8 @@ nnoremap <leader>rv :source $MYVIMRC<CR>
nnoremap <leader>R q:i%s///g<ESC>2F/i
" set syntax to shell (for dotfiles)
nnoremap <leader>s :set syn=sh<CR>
" replace bars/underscores in URL
nnoremap <leader>url :.s/\([-_]\)/\\\1/g<CR>
" format current line
nnoremap <leader>w Vgq
" format this and next line

Loading…
Cancel
Save