Comments (9)
That's cool, I just took this idea and updated a new version which use the vim native &shell
and &shellcmdflag
config to execute commands.
You can have the latest version to execute your zsh commands now.
from asyncrun.vim.
Nice. Maybe i am doing something wrong I have zsh now but i can't use my aliases from .zshrc.
from asyncrun.vim.
check the shellcmdflag, commands are executed like these:
zsh -c "YOUR COMMANDS"
maybe you can try to change shellcmdflag from "-c" to "-ci":
:set shellcmdflag=-ci
from asyncrun.vim.
I use win10, the below is the cofiguration in _vimrc to use cygwin shell:
" Makes bash open in the working directory
let $CHERE_INVOKING=1
" Default path for Cygwin 64-bit, change accordingly
set shell=D:\pfs\cygwin\bin\bash.exe\ --login
" Without --login, Cygwin won't mount some directories such as /usr/bin/
set shellcmdflag=--login\ -c
" Default value is (, but bash needs "
set shellxquote=\"
" Paths will use / instead of \
set shellslash
I run:
:AsyncRun ls
But I get the error below:
|| [ls]
|| /usr/bin/bash: C:/Users/user/AppData/Local/Tempasyncrun.cmd: No such file or directory
|| [Finished in 0 seconds with code 127]
What cause the issue?
from asyncrun.vim.
别把 shell/shellcmdflag 设置成 cygwin,坑太多了,windows 下的 vim 不是给你这样用的,你这样设置不当 asyncrun 要出错,其他很多用 shell 工具的地方都要出错。
你想再 windows 下用很多 unix 工具,安装个 busybox 就行了。你实在想用 asyncrun 跑 cygwin 命令,可以:
:AsyncRun D:\pfs\cygwin\bin\bash.exe --login -c "ls -la"
嫌弃命令长,你可以自己定一个短点的,比如叫做 AsyncCygwin
from asyncrun.vim.
另外,你 windows 10 的话,为什么不用 wsl 呢?AsyncRun 支持 wsl 命令:
:AsyncRun -program=wsl ls -la
from asyncrun.vim.
谢谢。用Cygwin主要是办公环境用于交叉编译的需要,其他在考虑中,不过短时间内还不好切换。
from asyncrun.vim.
那你设置 &shell 成 cygwin 这个操作麻烦了,导致内外路径都对不起来。
from asyncrun.vim.
I "solved" this for myself by creating a separate zshrc file. I run AsyncRun a lot. Your mileage may vary.
~/.zshrc-lite
contains only the functionality I want in AsyncRun since loading my proper~/.zshrc
is too slow~/.zshrc
sources~/.zshrc-lite
- the command I run to open AsyncRun calls
:AsyncRun -mode=term source ~/.zshrc-light &&
<- with space on the end so I can type the command right away
from asyncrun.vim.
Related Issues (20)
- 当多个任务运行时,g:asyncrun_exit是不是不够用了。 HOT 1
- -pos 参数不生效 HOT 1
- Feature: Run in a terminal, but send output to quickfix? HOT 4
- 与其他使用 quickfix 的插件冲突 HOT 1
- should be able to use "%" like all other normal vim commands. HOT 4
- -post function calling fails if function has character # in name HOT 5
- E117: Unknown function: asyncrun#run from .vimrc, but call asyncrun#run works fine after vim starts HOT 6
- Feature request: add an autocmd when project rooted. HOT 1
- Any way to auto-scroll when using term with no focus? HOT 6
- Job queues HOT 2
- AsyncStop does not work when I use it to kill a endless loop HOT 2
- unknown bug (duplicate output maybe) HOT 1
- floaterm: allow to set "autoclose"?
- Can this plugin run code in docker container and get the result in quickfix list? HOT 2
- no way to stop the job when running with -pos=hide
- How to run python scripts with other python interpreter? HOT 1
- 用quickui显示 结束关闭后buffer也不会消除, 新开也不会重用该buffer HOT 5
- Document option -append
- runner为floaterm时出现错误:不允许在弹出窗口中使用 HOT 7
- [nvim] Changing shell options on windows breaks AsyncRun HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asyncrun.vim.