New command ideas
I need ideas for new commands, so comment here anything you might want !
What you think about a command that opens just a terminal in the current workspace to run some quick code while editing. But the terminal is persistent, so that you can execute your program or whatever, esc out, edit some, use some other one term commands, come back to the terminal, and you still have the output etc. I just like the floating thing more than the standard neovim term.
This should be feasible, I'll look into it EDIT : done with 25b41e17a61ce35a929199f5a1b5c01c0752c16e to 886d951 EDIT2: I'll document shortly, I forgot
so how do you exit it again? since it captures all the keyinput, because by typing exit of course you kill the instance.
You can use <C-\><C-n> to get back to normal mode
alright, but it doesnt stop rendering the floating window, i can jump outside but the floating window is still in front and if i close it with "c-w c" my vim crashes. free(): invalid size zsh: abort (core dumped) nvim -S ./Session.vim
I'm looking into this, a stable version should be up shortly.
Well it should be working now
And btw you still need to close the window when you're down (if you delete the buffer it will open a new shell instance).
first i got this error when closing the window Error executing vim.schedule lua callback: vim.lua:492: Vim(source):E484: Can't open file /tmp/o neterm
then i manually created the file and had no error when closing the windows, but still calling ":OneTerm term" again opens a new instance, old output is gone
The first issue is easy to fix and I'll work on it tomorrow (meaning in ~16h) How do you close the window ? The file should be created anyway unless you exit the shell early
so i exit terminal mode with <c-\><c-n> and then use <c-w>c which i didnt remap which executes :close
All right, it's weird cause I tested it by closing it this way. Can you check if g:oneterm_term_buf changes every time you open a new window?
it does indeed, went from 9 to 10
All right, thanks, I'll look into it tomorrow. The other commands are working for you (apart for #3)?
well files isnt working since it depends on rg and i only have ag currently (and fd-find ) but thats to be expected.
now that i tested :OneTerm buffers i saw that the terms are actually there
the :OneTerm make listed some makefiles but it didnt compile on enter, also without the path of the makefile im missing the context which is which, also im getting no targets, only makefiles. but im using <leader>m for compiling and have a dedicated .exrc file in the project root to set makeprg because i also specify a -C flag for the command
symbols works for me, i have nvim-lspconfig, but ws_symbols doesnt give me anything
also what i noticed is that its a little annoying that for every match with fzf there is the full absolute path, usually there is little space left for the actual match, so maybe an omision or a compression of parts of the path would be nice.
also another idea would be to add snippet search
references is giving me results but opens nonsense ~/learncpp/src/main.cpp 27 Mystring string{ this is the buffer name and the buffer is empty when i jump to a reference
and yank isnt working for me i have let g:var_oneterm_yank = 1 in my vimrc and i get
Error detected while processing function Oneterm_cmd: line 2: E5108: Error executing lua [string "luaeval()"]:1: attempt to call field 'yank' (a nil value)
is there some dependency or smth?
It would be great if OneTerm commits were colorful.
It's almost useless without syntax because it's hard to see the diffs.
And would be useful OneTerm bcommits to see diffs for current buffer only.
For OneTerm rg it would be useful if the results had line numbers.
Thanks for your work.
also what i noticed is that its a little annoying that for every match with fzf there is the full absolute path, usually there is little space left for the actual match, so maybe an omision or a compression of parts of the path would be nice.
Could you please open an issue for this please ? It will take some time & work but I'll try
and yank isnt working for me i have
let g:var_oneterm_yank = 1in my vimrc and i get
Error detected while processing function Oneterm_cmd: line 2: E5108: Error executing lua [string "luaeval()"]:1: attempt to call field 'yank' (a nil value)is there some dependency or smth?
The actual command is yanks, The s is missing from the completion function and doc. I'll push this soon
I see, also the last time I looked term wasn't in the completions
Neovim has now native floating border.
It could be easy to put in function getopts() local opt: border = 'single'
Neovim has now native floating border. It could be easy to put in
function getopts()local opt:border = 'single'
I saw this, that's why I created g:oneterm_options, you can simply put it in there !
I fixed most of the issues above, apart from @aMOPel 's term issue, ws_symbols and make. I've also added bcommits.
The paths on the lsp matching are now relative btw
@aMOPel could you also please open an issue for the problem you have with term please ? I can't reproduce it...
the
:OneTerm makelisted some makefiles but it didnt compile on enter, also without the path of the makefile im missing the context which is which, also im getting no targets, only makefiles. but im using<leader>mfor compiling and have a dedicated .exrc file in the project root toset makeprgbecause i also specify a-Cflag for the command>
Did you run the command with a Makefile in neovim's working directory ?
the
:OneTerm makelisted some makefiles but it didnt compile on enter, also without the path of the makefile im missing the context which is which, also im getting no targets, only makefiles. but im using<leader>mfor compiling and have a dedicated .exrc file in the project root toset makeprgbecause i also specify a-Cflag for the command>Did you run the command with a Makefile in neovim's working directory ?
not in the root of the working directory but in a folder 1 below
About ws_symbols, not many language servers support it, so in those cases it will be empty. I tested it in python with jedi and it works.
the
:OneTerm makelisted some makefiles but it didnt compile on enter, also without the path of the makefile im missing the context which is which, also im getting no targets, only makefiles. but im using<leader>mfor compiling and have a dedicated .exrc file in the project root toset makeprgbecause i also specify a-Cflag for the command>Did you run the command with a Makefile in neovim's working directory ?
not in the root of the working directory but in a folder 1 below
Ok that's why it isn't working, I'm only detecting targets for neovim's pwd. I'll try making the plugin walk a few directories up