New user to Onivim, getting started is not easy

So, I actually got my Onivim License Key a while back.
Am a Vim user for about 4 years.
For me it was never ready enough for getting actual work done.

I have now decided to try and give it a try again.

I am struggling with some very basic stuff.
And the biggest issue is that I cant find anything in the documentation to help me with that.

Setup:
fresh installation on windows.
trying to work on current projects in C++, and some files in Lua.

Issues I have:

  1. gt and gT dose not work.
    how the @#$ do I move around the tabs?
    also :ls dose not do anything and :tabNext dose not seems to work.

  2. I have set “ignorecase” and “smartcase”. however, when in the file browser, It has no effect.
    must use case sensitive search when looking for files.

  3. I cant install ctags/Exuberant ctags.
    searching in the Extention tabs shows no results

  4. language/project tools:
    gd dose not work.

CTRL-] work if the definition is on the same line.
if the symbol is defined on a different file, the file will be opened, but I will be taken to the beginning of the file and not to the actual definition of the symbol.

  1. the outline in the file browser is empty.

  2. no smart auto complete or anything like that.
    should I install an extension for this to work?

If anyone has any tips for me to overcome these issues I will be very greatfull.

Thanks!

3 Likes

Corresponding tweet for this thread:

Share link for this tweet.

2 Likes

Welcome Nir! :smiley:

Hopefully @bryphe or @zbaylin will spot this and be able to offer you some help :blush:

2 Likes

Hi Nir,

Developer on Onivim here. Thanks for trying it out and reporting your feedback! Still have work to do to be able to check that ‘Easy to use’ bullet point.

gt and gT dose not work.

Actually another user just posted feedback here too: Feature Request: Add gt and gT as default keybindings · Issue #3673 · onivim/oni2 · GitHub

The confusing part is the concept of ‘tabs’ - editors like VSCode/Sublime have a concept of tabs that are per split, whereas Vim’s ‘tabs’ are actually containing a set of splits.

Right now - gt and gT only work on ‘Vim-style’ tabs: tabs created via :tabnew. To cycle the ‘editor tabs’, you can use Control+PageUp/Control+PageDown.

I’m exploring some improvements though - I’m working on the following:

  • A diagram to show the difference between the ‘editor tabs’ and ‘vim tabs’
  • Change the default, such that if there aren’t any vim tabs created, gt and gT will cycle the editor tabs.

Control+Tab is another quick way to jump between buffers that’s worth trying out.

I have set “ignorecase” and “smartcase”. however, when in the file browser, It has no effect.
must use case sensitive search when looking for files.

Ah, I just saw an issue logged for this today - must’ve been from you? Thank you for taking the time to log it, it’s indeed a bug that the search isn’t taking those values into account!

cant install ctags/Exuberant ctags. searching in the Extention tabs shows no results

Unfortunately looks like Exuberant ctags isn’t in the Open VSX marketplace.

I recommend using the clangd extension for C & C++ - it works pretty well out of the box, and even better if there is a compile-commands.json to give it some info about include paths.

Some more instructions here in our docs.

For gd support, outline, and auto-complete - clangd or another extension is needed to give that language functionality.

If clangd doesn’t work for you, we could look at forking + publishing the exuberant-ctags extension on open-vsx. I’ve had a few users tell me they prefer the ctags flow. Let me know how it goes!

Cheers,
Bryan

2 Likes

Hi bryphe,
Thanks for the fast and detailed replay!
You helped me getting to a place I can try and do some work with Onivim2,

Here is some more feedback:
I would love to see gt and gT do the same work as CTRL+PageUp and CTRL+PageDown.
its just closer to the Vim experiance that I/users expect ( I think?)

I am trying to work with clangd.
So far, it seems to work OK.
interesting fact, CTRL-] dose not jump to the exact location, also CTRL-T dose not return to the exact location.
However, gd dose work well, and CTRL-O dose return to the correct position.

last question, when using auto complete and there are several options, is there a key to navigate up and down the list? I don’t want to use the arrow keys because I don’t want to leave the Home row.
In VsCode there is a way to use CTRL-J/K to navigate the list.

Thanks again.

3 Likes

Hi @nirg,

Thank you for the feedback! Glad it’s getting closer to working for your workflow

Looks like CTRL-] isn’t hooked up to our language server - need to investigate that (and tags aren’t currently exposed, so CTRL-T might not return as expected). I’m glad gd/CTRL-O are working for you now with the clangd extension.

last question, when using auto complete and there are several options, is there a key to navigate up and down the list? I don’t want to use the arrow keys because I don’t want to leave the Home row.

By default CTRL-P/CTRL-N navigate up/down the list, respectively (and either <tab> or <enter> will accept a completion).

If you prefer CTRL-J/CTRL-K, you can add these to your keybindings.json:

  { "from": "<c-j>", "to": "<c-n>", "when": "editorTextFocus && suggestWidgetVisible"},
  { "from": "<c-k>", "to": "<c-p>", "when": "editorTextFocus && suggestWidgetVisible"}

(To edit your keybindings: Control+Shift+P → Preferences: Open Keybindings file)

Hope that helps!

2 Likes

Thanks again for the great and fast replay!

Here is the current key bindings I came up with to get started:

{ “from”: “”, “to”: “”, “when”: “editorTextFocus && suggestWidgetVisible || listFocus”},
{ “from”: “”, “to”: “”, “when”: “editorTextFocus && suggestWidgetVisible || listFocus”},
{ “from”: “”, “to”: “j”},
{ “from”: “”, “to”: “k”},
{ “from”: “”, “to”: “h”},
{ “from”: “”, “to”: “l”},
{ “key”: “gt”, “command”: “workbench.action.nextEditor”, “when”: “editorTextFocus” },
{ “key”: “g”, “command”: “workbench.action.previousEditor”, “when”: “editorTextFocus” }

Just one last question for now, witch is not clear from the ducumentation.
Is there any way at the moment to have VimL settings on startup? say in the config file?
commands like: set smartcase, set relativenumber


Thanks again.

1 Like

A post was split to a new topic: Is Onivim a good candidate for Elixir development?