Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling unite from alias, how to open unite buffer in start-insert? #133

Closed
joelmo opened this issue Feb 26, 2014 · 5 comments
Closed

Calling unite from alias, how to open unite buffer in start-insert? #133

joelmo opened this issue Feb 26, 2014 · 5 comments

Comments

@joelmo
Copy link

joelmo commented Feb 26, 2014

When executing vexe :Unite directory -start-insert won't open the unite buffer in insert mode for me, is there a work around or any way to fix this

@Shougo
Copy link
Owner

Shougo commented Feb 26, 2014

No. vexe is executed command in normal mode.

@Shougo Shougo closed this as completed Feb 26, 2014
@joelmo
Copy link
Author

joelmo commented Feb 27, 2014

I tried with this minimal vimrc

set nocompatible 

let bundles = split('unite.vim;vimshell.vim;vimproc.vim', ';')
let bundles = map(bundles, 'expand("~/.vim/bundle/") . v:val')

execute 'set rtp=' . join(bundles, ',')

Then:

  1. :VimShell
  2. Type and execute :Unite directory -start-insert in vimshell buffer.
  3. jjjj or verify I am in normal mode -- I find myself in normal mode while I should be in Insert?

I looked at vexe.vim, I commented out call vimshell#helpers#restore_pos(old_pos) and then i could start Unite with -start-insert.

@Shougo
Copy link
Owner

Shougo commented Feb 27, 2014

It is feature now. You should not make minimal .vimrc.

Shougo added a commit that referenced this issue Feb 27, 2014
@Shougo
Copy link
Owner

Shougo commented Feb 27, 2014

vexe --insert :Unite directory -start-insert

@Shougo Shougo reopened this Feb 27, 2014
@Shougo Shougo closed this as completed Feb 27, 2014
@joelmo
Copy link
Author

joelmo commented Feb 27, 2014

I tried this change but yours is more flexible, thank you.

    if &ft == 'unite' && unite#get_context().start_insert
    else
      stopinsert
    endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants