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
augroup filetype | |
autocmd! | |
" bib file | |
autocmd BufRead,BufNewFile *.bib set filetype=bib | |
autocmd Filetype bib let &formatprg="bibclean" | |
augroup END |
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
#!/usr/bin/perl | |
$latex = 'platex -interaction=nonstopmode -kanji=utf-8 %O %S'; | |
$dvipdf = 'dvipdfmx %O -o %D %S'; | |
$bibtex = 'pbibtex'; | |
$pdf_mode = 3; # use dvipdf | |
$pdf_update_method = 2; | |
$pdf_previewer = "start mupdf %O %S"; | |
# Prevent latexmk from removing PDF after typeset. | |
# $pvc_view_file_via_temporary = 0; |
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
" set the root dir for loading plugins(you can set multiple directories) | |
let g:plugin_loader_roots = "~/.path/to/vimperator/plugins,~/path/to/another/plugins" | |
" specify the plugin you use (you can omit '.js') | |
let g:plugin_loader_plugins = "plugin1,plugin2" |
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
# recordmydesktop completion {{{ | |
#------------------------------------------------------------------------------ | |
_recordmydesktop() { | |
local curcontext="$curcontext" diropts prev numopts | |
typeset -A opt_args | |
numopts="-x|-y|--channels|--freq|--buffer-size|--ring-buffer-size|--delay" | |
ddir="/media/shotaro/STOCK/Videos/mycast" | |
prev=$words[CURRENT-1] |
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
<Prefix> + r => reload config file | |
bind-key r source-file ~/.tmux.conf \; display "Reloaded!" |
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
augroup titlesettings | |
autocmd! | |
autocmd BufEnter * call system("tmux rename-window " . "'[vim] " . expand("%:t") . "'") | |
autocmd VimLeave * call system("tmux rename-window zsh") | |
autocmd BufEnter * let &titlestring = ' ' . expand("%:t") | |
augroup END |
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
def _generate_w3m_input(self, path, start_x, start_y, max_width, max_height): | |
"""Prepare the input string for w3mimgpreview | |
start_x, start_y, max_height and max_width specify the drawing area. | |
They are expressed in number of characters. | |
""" | |
fontw, fonth = _get_font_dimensions() | |
if fontw == 0 or fonth == 0: | |
raise ImgDisplayUnsupportedException() |
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
def clear(self, start_x, start_y, width, height): | |
if not self.is_initialized or self.process.poll() is not None: | |
self.initialize() | |
fontw, fonth = _get_font_dimensions() | |
cmd = "6;{x};{y};{w};{h}\n4;\n3;\n".format( | |
x = int((start_x - 0.2) * fontw), | |
y = int((start_y + 0.6) * fonth), | |
w = int((width + 0.4)* fontw), |
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
#-------- youtube-dl completion {{{ | |
# put this script in your .zshrc | |
# generated by: | |
# https://github.com/rg3/youtube-dl/blob/master/devscripts/zsh-completion.in | |
# https://github.com/rg3/youtube-dl/blob/master/devscripts/zsh-completion.py | |
# and modified manually | |
__youtube_dl() { | |
local curcontext="$curcontext" fileopts diropts cur prev | |
typeset -A opt_args |
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
# if session has > 1 windows in current, kill-pane without confirmation. | |
# But confirm before killing pane when it is the last pane in the last window. | |
bind -n M-x if "tmux display -p \"#{session_windows}\" | grep ^1\$ && tmux display -p \"#{window_panes}\" | grep ^1\$" \ | |
"confirm-before -p \"Kill the only pane in the only window? It will kill this session too. (y/n)\" kill-pane" \ | |
"kill-pane" |