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

A doubt regarding vim command line #66

Open
sankaran1984 opened this issue Aug 6, 2016 · 3 comments
Open

A doubt regarding vim command line #66

sankaran1984 opened this issue Aug 6, 2016 · 3 comments

Comments

@sankaran1984
Copy link

Hi Andrew,

Thanks a lot for the great plugin. I'm trying to run force.com vim commands from console directly.
i,e, for ex,
vim -c ApexInitProject
(or)
vim -c ApexCompare

It's working fine. But, After the command execution, it ends up in VI editor. Is there anyway, to redirect output of vim directly to Console. So that, VI doesn't get open at all ?

@neowit
Copy link
Owner

neowit commented Aug 7, 2016

Hello @sankaran1984

not 100% sure that I understood your question correctly...

On the one hand it looks like you want to interact with SFDC from a command-line or script type scenario and do not need interactiveness.
But on the other hand you mentioned :ApexInitProject and : ApexCompare which are very much interactive commands and do not make much sense without interactive user input.

Is there anyway, to redirect output of vim directly to Console. 
So that, VI doesn't get open at all 

You could use tooling-force.com.jar directly without going through vim/vim-force.com.
To find out what command line parameters are needed for specific command you could either

  • run specific command from vim and note what tooling-force.com.jar command line parameters vim-force.com generates
  • or run java -jar tooling-force.com.jar to get the list of supported commands and then run java -jar tooling-force.com.jar --help=<action-name> to get details about specific command.

Note however that some vim-force.com commands (e.g. :ApexInitProject) make no sense outside of vim and are written in pure vimL, so can not be run outside of vim.

If this does not answer your question then you may need to mention your use case in more details.

@sankaran1984
Copy link
Author

HI @neowit

Oh.. ok. . Acutally, i like all your VIM Commands ApexInitProject, ApexCompare, Apex*.... it covers most of the workflow a developer needs on day to day job..

As the same time, i felt it would be better if it possible to run directly from console without being in VI editor. Also, i feel invoking commands inside the editor has few benefits like it could guess what is the current working project, access to all buffers, etc..
So, invoking from console, you need to pass project, file details explicitly to Apex* Commands.

If you think, it's not designed in that way, no issues. i can develop something similiar.

On tooling jar file, i knew about that. I have pretty much gone through complete source code. Thanks for your reply & great work again.

@neowit
Copy link
Owner

neowit commented Aug 8, 2016

If you think, it's not designed in that way, no issues. i can develop something similiar.

Yes, vim-force.com is a vim plugin and meant to be used inside vim. It was not designed to be run from console.

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