Skip to content

Instantly share code, notes, and snippets.

@wildskyf
Created June 2, 2016 05:57
Show Gist options
  • Save wildskyf/c5c7141034619828ee1c4d268a548e9c to your computer and use it in GitHub Desktop.
Save wildskyf/c5c7141034619828ee1c4d268a548e9c to your computer and use it in GitHub Desktop.
" # Autocommands
"
autocmd LocationChange disp\.cc/ -js modes.set(modes.PASS_THROUGH)
autocmd LocationChange (mail|www)\.google\.com/(calendar|mail|reader)/ -js modes.set(modes.PASS_THROUGH)
autocmd LocationChange docs\.google\.com/(document|present|spreadsheet) -js modes.set(modes.PASS_THROUGH)
"autocmd LocationChange mail\.yahoo\.com/ -js modes.set(modes.PASS_THROUGH)
"autocmd LocationChange github\.com/ -js modes.set(modes.PASS_THROUGH)
"autocmd LocationChange bitbucket\.org/ -js modes.set(modes.PASS_THROUGH)
autocmd LocationChange quip\.com/ -js modes.set(modes.PASS_THROUGH)
" # GUI
"
" - Default show GUI elements of 'Bookmarks Toobar', 'Tab number over image' and 'Status bar'.
set guioptions=Ns
" - Disable Alt key to toggle hidden Menu bar for Debian, Ubuntu.
set guioptions-=m
set! ui.key.menuAccessKeyFocuses=false
" # Options
"
" - Maximum number of items to display at once in a listing.
set maxitems=6
"
" - Items which are completed at the :open prompts.
set complete=b
"
" - Highlight previous find pattern matches.
set hlfind
"
" - The keys used to label and select hints.
set hintkeys=asdfghjkl;
" # Styling
"
" - Highlight {group} with [css]. [css] is one or more semicolon-separated CSS declarations (E.g. color: blue; background-color: red).)]]}
hi Hint font:bold 16px monospace !important; margin:-.2ex; padding: 0 0 0 1px; outline:1px solid rgba(0, 0, 0, .5); background:rgba(255, 248, 231, .8); color:black; text-transform:uppercase;
"
" 自訂狀態列樣式。
highlight StatusLineNormal color: #FFF ; background: #323232 !important; font-size: 12pt; font-family: monospace; font-weight: 600; padding: 0px 3px;
"
" - Scroll page.
map -modes=n j <C-d>
map -modes=n J -builtin 3j
map -modes=n k <C-u>
map -modes=n K -builtin 3k
"map -modes=n b <PageUp>
"
"
" - Enabled 'Inspect' of Web Developer plugin..
map -modes=n <A-d> <C-S-i>
map -modes=n <A-c> <C-S-c>
"
" - Trigger 'Group Tabs'.
map -modes=n <A-e> <C-S-e>
map -modes=n <M-e> <M-C-e>
"
" - Open Firebug UI.
map -modes=n <A-f> <F12>
"
" - Tag switch
map -modes=n <A-h> gt
map -modes=n <A-k> gt
map -modes=n <M-h> -builtin gt
map -modes=n <A-l> gT
map -modes=n <A-j> gT
map -modes=n <M-l> -builtin gT
map -modes=n <A-1> -builtin 1gt
map -modes=n <A-2> -builtin 2gt
map -modes=n <A-3> -builtin 3gt
map -modes=n <A-4> -builtin 4gt
map -modes=n <A-5> -builtin 5gt
map -modes=n <A-7> -builtin 7gt
map -modes=n <A-8> -builtin 8gt
map -modes=n <A-9> -builtin 99gt
"
" - Show a list of all buffers.
map -modes=n ,l -builtin :ls<Return>
"
" - history switch
map -modes=n <C-h> :back<Return>
map -modes=n <C-l> :forward<Return>
"
" - GUI switch.
map -modes=n <F7> :set<Space>guioptions=NsT<Space><Return>
map -modes=n <F8> :set<Space>guioptions=Ns<Space><Return>
map -modes=n <F9> :set<Space>guioptions-=s<Space><Return>
"
" - Doing something with selected.
"
" - Open URL, bookmarks or history.
map -modes=n o -js content.getSelection().toString()!=""?dactyl.execute(":open "+ content.getSelection()):CommandExMode().open("open ")
map -modes=n t -js content.getSelection().toString()!=""?dactyl.execute(":tabopen "+ content.getSelection()):CommandExMode().open("tabopen ")
"
" - Quick open link.
"
" - history
map -modes=n <ESC>h :hs!
" # Abbreviate
"
cabbreviate dl downloads
cabbreviate wi !whois
cabbreviate tr !traceroute
iabbreviate apti aptitude
iabbreviate app application
iabbreviate cano Canonical
iabbreviate fx Firefox
iabbreviate lin Linux
iabbreviate ms Microsoft
iabbreviate pent Pentadactyl
iabbreviate tp ThinkPad
iabbreviate ubu Ubuntu
iabbreviate vimp Vimperator
" # Editor
"
js <<EOM
options.editor = 'gvim -f +<line> +"sil! call cursor(0, <column>)" <file>';
EOM
" vim: set ft=pentadactyl:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment