Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa committed Dec 12, 2014
2 parents 42cfc7c + 914dc03 commit 79c43ef
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 32 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
language: viml

env:
- PPA=yes
- PPA=no

install:
- if [ x"$PPA" == "xyes" ] ; then sudo add-apt-repository ppa:pi-rho/dev -y; fi
- sudo apt-get update -q
- sudo apt-get install vim-gtk

before_script:
- vim --version
- git clone https://github.com/thinca/vim-themis
- git clone https://github.com/syngan/vim-vimlint /tmp/vim-vimlint
- git clone https://github.com/ynkdir/vim-vimlparser /tmp/vim-vimlparser
before_script:
- vim --version

script:
- vim-themis/bin/themis --reporter spec
- vim --cmd "try | helptags doc/ | catch | cquit | endtry" --cmd quit
- sh /tmp/vim-vimlint/bin/vimlint.sh -l /tmp/vim-vimlint -p /tmp/vim-vimlparser -e EVL102.l:_=1 -c func_abort=1 autoload/incsearch.vim
- sh /tmp/vim-vimlint/bin/vimlint.sh -l /tmp/vim-vimlint -p /tmp/vim-vimlparser -e EVL102.l:_=1 -c func_abort=1 autoload/incsearch
57 changes: 27 additions & 30 deletions autoload/incsearch.vim
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ call s:cli.connect('Digraphs')
call s:cli.connect('Delete')
call s:cli.connect('DrawCommandline')
call s:cli.connect('ExceptionExit')
" NOTE: see s:cli.keymapping()
" call s:cli.connect('Exit')
" NOTE:
" <CR> in {rhs} wil be remapped even after exiting vital-over comman line
" interface, so do not use <Over>(exit)
" See also s:cli.keymapping()
let s:incsearch_exit = {
\ "name" : "IncsearchExit",
\ "exit_code" : 0
Expand Down Expand Up @@ -178,36 +181,29 @@ endfunction
call s:cli.connect(s:pattern_saver)

function! s:cli.keymapping() abort
" NOTE:
" 'lock' doesn't be remapped if it is in the multi {rhs} mapping
" workaround: use s:incsearch_exit module and do not use `lock` fetaure
" \ "\<CR>" : {
" \ "key" : "<Over>(exit)",
" \ "noremap" : 1,
" \ "lock" : 1,
" \ },
return extend({
\ "\<Tab>" : {
\ "key" : "<Over>(incsearch-next)",
\ "noremap" : 1,
\ },
\ "\<S-Tab>" : {
\ "key" : "<Over>(incsearch-prev)",
\ "noremap" : 1,
\ },
\ "\<C-j>" : {
\ "key" : "<Over>(incsearch-scroll-f)",
\ "noremap" : 1,
\ },
\ "\<C-k>" : {
\ "key" : "<Over>(incsearch-scroll-b)",
\ "noremap" : 1,
\ },
\ "\<C-l>" : {
\ "key" : "<Over>(buffer-complete)",
\ "noremap" : 1,
\ },
\ }, g:incsearch_cli_key_mappings)
\ "\<Tab>" : {
\ "key" : "<Over>(incsearch-next)",
\ "noremap" : 1,
\ },
\ "\<S-Tab>" : {
\ "key" : "<Over>(incsearch-prev)",
\ "noremap" : 1,
\ },
\ "\<C-j>" : {
\ "key" : "<Over>(incsearch-scroll-f)",
\ "noremap" : 1,
\ },
\ "\<C-k>" : {
\ "key" : "<Over>(incsearch-scroll-b)",
\ "noremap" : 1,
\ },
\ "\<C-l>" : {
\ "key" : "<Over>(buffer-complete)",
\ "noremap" : 1,
\ },
\ "\<CR>" : {"key": "\<CR>", "noremap": 1},
\ }, g:incsearch_cli_key_mappings)
endfunction

let s:inc = {
Expand Down Expand Up @@ -269,6 +265,7 @@ function! s:on_searching(func, ...) abort
catch /E53:/ " E53: Unmatched %(
catch /E54:/
catch /E55:/
catch /E62:/ " E62: Nested \= (with /a\=\=)
catch /E63:/ " E63: invalid use of \_
catch /E64:/ " E64: \@ follows nothing
catch /E65:/ " E65: Illegal back reference
Expand Down

0 comments on commit 79c43ef

Please sign in to comment.