| 1 | " otsune .vimperatorrc |
|---|
| 2 | " 2.0pre (created: 2008/11/30 19:30:34) |
|---|
| 3 | " Mappings |
|---|
| 4 | |
|---|
| 5 | echo "loading..." |
|---|
| 6 | " minimum css |
|---|
| 7 | noremap ! :set usermode<CR> |
|---|
| 8 | |
|---|
| 9 | " set mark-a, jump mark-a |
|---|
| 10 | noremap _ ma |
|---|
| 11 | noremap } `a |
|---|
| 12 | |
|---|
| 13 | " |
|---|
| 14 | noremap j 5j |
|---|
| 15 | noremap k 5k |
|---|
| 16 | noremap J <C-d> |
|---|
| 17 | noremap K <C-u> |
|---|
| 18 | |
|---|
| 19 | " select next/previous tab |
|---|
| 20 | noremap <Right> gt |
|---|
| 21 | noremap <Left> gT |
|---|
| 22 | noremap <C-l> gt |
|---|
| 23 | noremap <C-h> gT |
|---|
| 24 | noremap <C-w>l gt |
|---|
| 25 | noremap <C-w>h gT |
|---|
| 26 | |
|---|
| 27 | " move current tab left/right |
|---|
| 28 | map <S-Right> :tablast<CR> |
|---|
| 29 | map <S-Left> :tabfirst<CR> |
|---|
| 30 | map <C-L> :tabmove! +1<CR> |
|---|
| 31 | map <C-H> :tabmove! -1<CR> |
|---|
| 32 | |
|---|
| 33 | " ex mode |
|---|
| 34 | cmap <C-d> <Tab> |
|---|
| 35 | "cmap <Down> <Tab> |
|---|
| 36 | "cmap <Up> <S-Tab> |
|---|
| 37 | cmap <C-n> <Tab> |
|---|
| 38 | cmap <C-p> <S-Tab> |
|---|
| 39 | |
|---|
| 40 | " |
|---|
| 41 | map <A-b> :set guioptions+=b<CR> |
|---|
| 42 | ""map <Leader>b :set guioptions+=b<CR> |
|---|
| 43 | map <A-B> :set guioptions-=b<CR> |
|---|
| 44 | ""map <Leader>B :set guioptions-=b<CR> |
|---|
| 45 | ""map <Leader>t :toggleToolbar<CR> |
|---|
| 46 | "noremap <Leader>t :mb tumblr.reblog<CR> |
|---|
| 47 | "noremap <Leader>p :pukka<CR> |
|---|
| 48 | noremap ,b :bentry<CR> |
|---|
| 49 | noremap ,p :pukka<CR> |
|---|
| 50 | noremap ,t :tombloo Quote<CR> |
|---|
| 51 | |
|---|
| 52 | " Unhidden and hidden the menubar and the toolbar |
|---|
| 53 | "map <A-Up> :set guioptions+=mT<CR> |
|---|
| 54 | "map <A-Down> :set guioptions-=mT<CR> |
|---|
| 55 | |
|---|
| 56 | "javascript <<EOM |
|---|
| 57 | " toggle_element = function (name){ |
|---|
| 58 | " document.getElementById(name).collapsed ^= 1; |
|---|
| 59 | " } |
|---|
| 60 | "EOM |
|---|
| 61 | |
|---|
| 62 | " ;A |
|---|
| 63 | javascript <<EOM |
|---|
| 64 | hints.addMode( 'A', 'copy URL and description', |
|---|
| 65 | function (element) util.copyToClipboard('<a href="' + element.href + '">' + element.textContent + '</a>', true), |
|---|
| 66 | function () '//a[@href]' |
|---|
| 67 | ); |
|---|
| 68 | EOM |
|---|
| 69 | |
|---|
| 70 | " Options |
|---|
| 71 | highlight Bell display:none |
|---|
| 72 | set guioptions+=b |
|---|
| 73 | "set titlestring=Vimperator |
|---|
| 74 | set verbose=9 |
|---|
| 75 | set history=1000 |
|---|
| 76 | set complete=sl |
|---|
| 77 | set wildoptions=auto |
|---|
| 78 | set suggestengines=google |
|---|
| 79 | set newtab=all |
|---|
| 80 | set focuscontent |
|---|
| 81 | "set hintstyle+=font-size:15px; |
|---|
| 82 | "]] |
|---|
| 83 | set nextpattern+=次(の)?ページ,→\b,下一頁,Следующая,다음 |
|---|
| 84 | "[[ |
|---|
| 85 | set previouspattern+=prev, 前(の)?ページ,\b← |
|---|
| 86 | " |
|---|
| 87 | set editor=/opt/local/bin/gvim -f |
|---|
| 88 | |
|---|
| 89 | " sbm |
|---|
| 90 | "let g:direct_sbm_use_services_by_tag = "d" |
|---|
| 91 | "let g:direct_sbm_use_services_by_post = "d" |
|---|
| 92 | |
|---|
| 93 | " pukka plugin variable |
|---|
| 94 | let g:pukka_normalizelink = "true" |
|---|
| 95 | |
|---|
| 96 | " ime_control.js |
|---|
| 97 | "let g:ex_ime_mode = "disabled" |
|---|
| 98 | let g:ex_ime_mode = "inactive" |
|---|
| 99 | let g:textarea_ime_mode = "inactive" |
|---|
| 100 | |
|---|
| 101 | " ldr_cooperation.js |
|---|
| 102 | let g:ldrc_captureMappings = "['t', 'T', 'h', 'l', 'j', 'k', 'p', 'o', '?']" |
|---|
| 103 | let g:ldrc_hints = "true" |
|---|
| 104 | let g:ldrc_intelligence_bind = "true" |
|---|
| 105 | |
|---|
| 106 | " |
|---|
| 107 | "autocmd LocationChange .* :js modes.passAllKeys = /^https?:\/\/mail\.google\.com/.test(buffer.URL) |
|---|
| 108 | "autocmd LocationChange .* :js modes.passAllKeys = /^https?:\/\/fastladder\.com/.test(buffer.URL) |
|---|
| 109 | |
|---|
| 110 | " copy.js |
|---|
| 111 | javascript <<EOM |
|---|
| 112 | liberator.globalVariables.copy_templates = [ |
|---|
| 113 | { label: 'titleAndURL', value: '%TITLE% %URL%' }, |
|---|
| 114 | { label: 'title', value: '%TITLE%' }, |
|---|
| 115 | { label: 'hatena', value: '[%URL%:title=%TITLE%]' }, |
|---|
| 116 | { label: 'hatenacite', value: '>%URL%:title=%TITLE%>\n%SEL%\n<<' }, |
|---|
| 117 | { label: 'markdown', value: '[%SEL%](%URL% "%TITLE%")' }, |
|---|
| 118 | { label: 'htmlblockquote', value: '<blockquote cite="%URL%" title="%TITLE%">%HTMLSEL%</blockquote>' } |
|---|
| 119 | ]; |
|---|
| 120 | EOM |
|---|
| 121 | |
|---|
| 122 | " Add Mapping `C-c' copy or stop loading |
|---|
| 123 | javascript <<EOF |
|---|
| 124 | mappings.addUserMap([modes.NORMAL,modes.VISUAL],['<C-c>'], 'Copy selected text or stop loading', |
|---|
| 125 | function(){ |
|---|
| 126 | var sel = window.content.window.getSelection().toString(); |
|---|
| 127 | if (sel){ |
|---|
| 128 | copyToClipboard(sel,true); |
|---|
| 129 | } else { |
|---|
| 130 | BrowserStop(); |
|---|
| 131 | echo('Stopped loading !'); |
|---|
| 132 | } |
|---|
| 133 | } |
|---|
| 134 | ); |
|---|
| 135 | EOF |
|---|
| 136 | |
|---|
| 137 | " Show feed-button to statusbar |
|---|
| 138 | javascript <<EOM |
|---|
| 139 | (function () { |
|---|
| 140 | var feedPanel = document.createElement('statusbarpanel'); |
|---|
| 141 | var feedButton = document.getElementById('feed-button'); |
|---|
| 142 | feedPanel.setAttribute('id','feed-panel-clone'); |
|---|
| 143 | feedPanel.appendChild(feedButton.cloneNode(true)); |
|---|
| 144 | feedButton.parentNode.removeChild(feedButton); |
|---|
| 145 | document.getElementById('status-bar') |
|---|
| 146 | .insertBefore(feedPanel,document.getElementById('security-button')); |
|---|
| 147 | })(); |
|---|
| 148 | EOM |
|---|
| 149 | |
|---|
| 150 | " disable accesskey |
|---|
| 151 | set! ui.key.generalAccessKey=0 |
|---|
| 152 | " open bookmarks in background |
|---|
| 153 | set! browser.tabs.loadBookmarksInBackground=true |
|---|
| 154 | |
|---|
| 155 | " Abbreviations |
|---|
| 156 | source! ~/.vimperatorrc.local |
|---|
| 157 | |
|---|
| 158 | " ~/.vimperator/coloe/otsune.vim |
|---|
| 159 | colorscheme otsune |
|---|
| 160 | |
|---|
| 161 | echo "done" |
|---|
| 162 | " vim: ft=vimperator sw=2 sts=2 |
|---|