| 1 | " mappings |
|---|
| 2 | |
|---|
| 3 | noremap j 5j |
|---|
| 4 | noremap k 5k |
|---|
| 5 | noremap <C-h> <Left> |
|---|
| 6 | noremap <C-l> <Right> |
|---|
| 7 | |
|---|
| 8 | noremap h gT |
|---|
| 9 | noremap l gt |
|---|
| 10 | |
|---|
| 11 | " pass-through |
|---|
| 12 | noremap <C-t> <C-z> |
|---|
| 13 | |
|---|
| 14 | " ex mode |
|---|
| 15 | cmap <C-n> <Tab> |
|---|
| 16 | cmap <C-p> <S-Tab> |
|---|
| 17 | cmap <C-b> <Left> |
|---|
| 18 | cmap <C-f> <Right> |
|---|
| 19 | |
|---|
| 20 | imap <C-b> <Left> |
|---|
| 21 | imap <C-f> <Right> |
|---|
| 22 | imap <C-p> <Up> |
|---|
| 23 | imap <C-n> <Down> |
|---|
| 24 | |
|---|
| 25 | "http://unsigned.g.hatena.ne.jp/Trapezoid/20080620/1213961754 |
|---|
| 26 | javascript <<EOM |
|---|
| 27 | [ |
|---|
| 28 | [',b', ':bentry'], |
|---|
| 29 | [',c', ':copy'], |
|---|
| 30 | [',t', ':tombloo! Link'] |
|---|
| 31 | ].forEach(function([key, command]){ |
|---|
| 32 | mappings.addUserMap([modes.NORMAL], [key], |
|---|
| 33 | "User defined mapping", |
|---|
| 34 | function () { execute(command); }, |
|---|
| 35 | { |
|---|
| 36 | rhs: key, |
|---|
| 37 | noremap: true |
|---|
| 38 | }); |
|---|
| 39 | }); |
|---|
| 40 | EOM |
|---|
| 41 | |
|---|
| 42 | set verbose=9 |
|---|
| 43 | set preload |
|---|
| 44 | |
|---|
| 45 | set titlestring=Minefield |
|---|
| 46 | set visualbell |
|---|
| 47 | set visualbellstyle+=opacity:0.8 |
|---|
| 48 | set wildoptions=auto |
|---|
| 49 | set complete=sl |
|---|
| 50 | set newtab=all |
|---|
| 51 | "set focuscontent |
|---|
| 52 | "set hintmatching=custom |
|---|
| 53 | |
|---|
| 54 | set nextpattern+=次(の)?ページ,→\b |
|---|
| 55 | set previouspattern+=prev, 前(の)?ページ,\b← |
|---|
| 56 | |
|---|
| 57 | autocmd LocationChange .* :fmapc |
|---|
| 58 | |
|---|
| 59 | javascript <<EOF |
|---|
| 60 | autocommands.add('LocationChange', /reader\.livedoor\.com\/reader\//, [ |
|---|
| 61 | 'js plugins.feedKey.setup(', |
|---|
| 62 | '"j k s a p v <Space> <S-Space> z Z < > q g h l n r R x T".split(/ +/)', |
|---|
| 63 | ');' |
|---|
| 64 | ].join('')); |
|---|
| 65 | EOF |
|---|
| 66 | autocmd LocationChange http://reader\.livedoor\.com/reader/ :fmap ; : |
|---|
| 67 | |
|---|
| 68 | " Show feed-button to statusbar |
|---|
| 69 | javascript <<EOM |
|---|
| 70 | (function () { |
|---|
| 71 | var feedButton = document.getElementById('feed-button'); |
|---|
| 72 | feedButton.parentNode.removeChild(feedButton); |
|---|
| 73 | var feedPanel = document.createElement('statusbarpanel'); |
|---|
| 74 | feedPanel.setAttribute('id', 'feed-panel-clone'); |
|---|
| 75 | feedPanel.appendChild(feedButton.cloneNode(true)); |
|---|
| 76 | document.getElementById('status-bar').insertBefore( |
|---|
| 77 | feedPanel, |
|---|
| 78 | document.getElementById('security-button') |
|---|
| 79 | ); |
|---|
| 80 | })(); |
|---|
| 81 | EOM |
|---|
| 82 | |
|---|
| 83 | javascript <<EOM |
|---|
| 84 | globalVariables.copy_templates = [ |
|---|
| 85 | { label: 'url', value: '%URL%' }, |
|---|
| 86 | { label: 'titleAndURL', value: '%TITLE% %URL%' }, |
|---|
| 87 | { label: 'hatena', value: '[%URL%:title=%TITLE%]' }, |
|---|
| 88 | { label: 'title', value: '%TITLE%' } |
|---|
| 89 | ]; |
|---|
| 90 | EOM |
|---|