-
Notifications
You must be signed in to change notification settings - Fork 93
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
[potential bug] When running <leader>te (task edit) I seem to open a vim instance within an vim instance #193
Comments
Are you using vim or neovim? |
neovim |
Does this issue still persist? I am able to perform :TaskWikiEdit in neovim just fine. Can you post your |
@arooni Taskwiki opens new neovim inside terminal buffer ( I think that neovim 0.1.x automatically started terminal buffers in terminal mode and that it changed for 0.2+, so maybe that's where confusion comes from? |
@mgoral |
No, taskwiki does that automatically. I'm just saying that there is a nested vim inside the original vim, so to access it and edit the task you have to press 'a' twice. :)
Dnia 28 marca 2019 18:48:46 CET, arooni <notifications@github.com> napisał(a):
…
@tbabej >
```>
[I] ~ nvim --version>
NVIM v0.3.4>
Build type: Release>
LuaJIT 2.0.5>
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang
-Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG
-DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter
-Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla
-fstack-protector-strong -fdiagnostics-color=auto
-DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE
-DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM
-I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/config
-I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/src
-I/usr/local/include -I/usr/local/opt/gettext/include
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include
-I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/src/nvim/auto
-I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/include>
Compiled by ***@***.***>
>
Features: +acl +iconv +jemalloc +tui>
See ":help feature-compile">
>
system vimrc file: "$VIM/sysinit.vim">
fall-back for $VIM: "/usr/local/Cellar/neovim/0.3.4/share/nvim">
>
Run :checkhealth for more info>
>
```>
>
@mgoral >
So you're saying I need to run :term before running taskwiki?>
>
-- >
You are receiving this because you were mentioned.>
Reply to this email directly or view it on GitHub:>
#193 (comment)
|
If I have a task selected, and then run :TaskWikiEdit It errors out:
Not sure if that's a different plugin that's getting in the way |
I'm seeing the same thing:
It looks like it's trying to launch |
This is happening in the |
i set and verified that the editor variable was set to nvim; but after running task edit i still get an error:
|
I'm not sure this is related to taskwiki though, a quick google search showcases this error discussed in various scenarios,i.e.: |
fair point. |
setting editor to nvim seeed to help quite a bit. but on some tasks i see:
even though there are no other nvim or taskwarrior processes. any insight to this? |
If you poke in the sources of Taskwarrior, in CmdEdit.cpp you can see that this is being raised if the filename for editing the task already exists: // Check if the file already exists, if so, bail out
Path filepath = Path (file.str ());
if (filepath.exists ())
throw std::string ("Task is already being edited."); So the fix here is to simply clean your |
@tbabej makes sense; it seems right now the only way to not get these extra *.task files is to use :q! which seems to terminate the whole nvim enterprise, not just the inner invocation used for taskwarrior. so is there a best practice other than quitting out of nvim after each task edit? definitely not trying to be a help vampire and i appreciate your help. |
i.e. how to quit out of the inner layer of task warrior (the edit screen) without quitting out of nvim completely |
Setting the EDITOR environment variable didn't work for me. I ended up adding:
to the |
@aaronfc any way to quit out of the embedded editor window if you decide you don't want to make changes? i run :q and it seems to run the containing taskwarrior window. running :bd simply kills the buffer and taskwarrior keeps *.task files in my ~/.taskwarrior directory that prevent me from editing the same task again until I clear them out. finally running :wq or :wq! from inside the editor (with no changes) shows "E382: Cannot write, 'buftype' option is set" |
@arooni You have first to go into insert mode (press |
@aaronfc thanks so much for breaking that down! |
@arooni |
Not sure if it is relevant yet, but I could not make it work with the previous suggestions. Ended up doing the following: install neovim remote
the contents of the file: #!/bin/bash
if [ -n "$NVIM_LISTEN_ADDRESS" ]; then
nvr -cc tabedit --remote-wait +'set bufhidden=wipe' "$@"
else
"nvim" "$@"
fi in export VISUAL=nested-nvim
alias v="$VISUAL"
alias vim="$VISUAL" reload shell and after that the edit worked in place for me :) |
env: ubuntu 18.04 with latest task warrior and taskwii
![screenshot from 2018-10-21 18-07-26](https://user-images.githubusercontent.com/556667/47273567-33f1eb00-d55c-11e8-9caf-891c3489fc30.png)
Use case:
I have taskwiki open as a buffer along with other buffers for my personal journal/notes file.
ideas? what am i doing wrong? thanks!
The text was updated successfully, but these errors were encountered: