Changeset 2168

Show
Ignore:
Timestamp:
11/30/07 15:01:53 (7 years ago)
Author:
kana
Message:

dotfiles/vim/kana:
* Merge the following changes from my local repository.

r1006@colinux: kana | 2007-11-28 01:04:31 +0900
vim/dot.vim/autoload/textobj/user.vim (s:rhs_escape):

  • Fix the bug that '<' was escaped as '<LT<GT>'.

    r1008@colinux: kana | 2007-11-28 01:18:05 +0900
    vim/dot.vim/autoload/textobj/user.vim (s:rhs_escape):
  • Fix the bug that '>' must not be escaped as '<GT>', because such notation
    doesn't exist.

    r1009@colinux: kana | 2007-11-28 01:21:10 +0900
    vim/dot.vim/ftplugin/issue.vim:
  • Map <LocalLeader?>j and <LocalLeader?>k to move to issue ids.
  • Map <Return> to s:JumpToIssue().
  • s:JumpToIssue(): New, but not implemented yet.

    r1021@colinux: kana | 2007-11-30 13:05:55 +0900
    vim/dot.vimrc:
  • (Key Mappings / Misc.): Fix the bug that visualmode() is used in map-expr
    (I expect that it will return the CURRENT Visual mode, but it will return
    the LAST Visual mode. It's returning value won't be updated in map-expr).

    r1023@colinux: kana | 2007-11-30 14:25:34 +0900
    vim/dot.vimrc:
  • (Plugins / surround): Move the definition of surrounding objects into
    vim/dot.vim/plugin/surround_config.vim, to fix the problem on broken
    multibyte strings.

    vim/dot.vim/plugin/surround_config.vim:
  • New, for the above change.

    Makefile:
  • (GROUP_VIM_FILES): Add new file.

    r1024@colinux: kana | 2007-11-30 14:33:29 +0900
    vim/dot.vimrc:
  • (modelines): Remove 'fileencoding' not to set 'modified' if the file doesn't
    contain any multibyte character.
Location:
dotfiles/vim/kana
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • dotfiles/vim/kana/dot.vim/autoload/textobj/user.vim

    r1732 r2168  
    209209  let r = a:pattern 
    210210  let r = substitute(r, '<', '<LT>', 'g') 
    211   let r = substitute(r, '>', '<GT>', 'g') 
    212211  let r = substitute(r, '|', '<Bar>', 'g') 
    213212  return r 
  • dotfiles/vim/kana/dot.vim/ftplugin/issue.vim

    r1923 r2168  
    1313 
    1414 
     15let s:RE_ISSUE_ID = '#\<\d\+\>' 
     16 
     17 
    1518 
    1619 
     
    2326nnoremap <buffer> <LocalLeader>s  :<C-u>call <SID>ShowStatus()<Return> 
    2427 
    25  
    2628nnoremap <buffer> <LocalLeader>i  :<C-u>call <SID>NewIssue()<Return> 
    2729nnoremap <buffer> <LocalLeader>n  :<C-u>call <SID>NewNote()<Return> 
    2830 
     31nnoremap <buffer> <Return>  :<C-u>call <SID>JumpToIssue()<Return> 
     32 
     33call textobj#user#define(s:RE_ISSUE_ID, '', '', { 
     34   \                       'move-to-next': '<LocalLeader>j', 
     35   \                       'move-to-prev': '<LocalLeader>k', 
     36   \                     }) 
    2937 
    3038"" Moving around elements (just a memo; not implemented yet). 
     
    7987 
    8088 
     89function! s:JumpToIssue() 
     90  echo 'FIXME: Not Implemented Yet.' 
     91  return 
     92  let BAD = [0, 0] 
     93  let pos = [line('.'), col('.')] 
     94 
     95  let fb = textobj#user#move(s:RE_ISSUE_ID, 'n') 
     96  let fe = textobj#user#move(s:RE_ISSUE_ID, 'ne') 
     97  let fdiff = s:Distance(pos, fb, fe) 
     98 
     99  let bb = textobj#user#move(s:RE_ISSUE_ID, 'nb') 
     100  let be = textobj#user#move(s:RE_ISSUE_ID, 'nbe') 
     101  let bdiff = s:Distance(pos, bb, be) 
     102 
     103  if fdiff != BAD && bdiff != BAD 
     104    if s:LT(fdiff, bdiff) 
     105    endif 
     106  elseif fdiff != BAD && bdiff == BAD 
     107  elseif fdiff == BAD && bdiff != BAD 
     108  else  " if fdiff == BAD && bdiff == BAD 
     109    " nop 
     110  endif 
     111endfunction 
     112 
     113 
     114 
     115 
    81116function! s:GetIDInfo() 
    82117  let pos = getpos('.') 
  • dotfiles/vim/kana/dot.vimrc

    r1923 r2168  
    10831083 
    10841084" Make I/A available in characterwise-visual and linewise-visual. 
    1085 vnoremap <expr> I  visualmode() == "\<C-v>" ? 'I' : "\<C-v>I" 
    1086 vnoremap <expr> A  visualmode() == "\<C-v>" ? 'A' : "\<C-v>A" 
     1085vnoremap I  :<C-u>call <SID>ForceBlockwiseVisual('I')<Return> 
     1086vnoremap A  :<C-u>call <SID>ForceBlockwiseVisual('A')<Return> 
     1087 
     1088function! s:ForceBlockwiseVisual(next_key) 
     1089  normal! gv 
     1090  if visualmode() != "\<C-v>" 
     1091    execute 'normal!' "\<C-v>" 
     1092  endif 
     1093  call feedkeys(a:next_key, 'n') 
     1094endfunction 
    10871095 
    10881096 
     
    14291437nmap ss  <Plug>Yssurround 
    14301438 
    1431 autocmd MyAutoCmd User DelayedSettings 
    1432       \   if exists('g:loaded_surround') || exists('*SurroundRegister') 
    1433       \ |   call SurroundRegister('g', 'js', "「\r」") 
    1434       \ |   call SurroundRegister('g', 'jd', "『\r』") 
    1435       \ | endif 
     1439" See also ~/.vim/plugin/surround_config.vim . 
    14361440 
    14371441 
     
    15001504 
    15011505" __END__  "{{{1 
    1502 " vim: fileencoding=utf-8 bomb 
     1506" vim: bomb 
    15031507" vim: expandtab softtabstop=2 shiftwidth=2 
    15041508" vim: foldmethod=marker