Closed d0t15t closed 2 years ago
Hi,
in Vim world when you want to create specific keymapping you need to use their naming notation for key shortcuts explained in command:
:h notation
In that case
<S-…> shift-key *shift* *<S-*
<C-…> control-key *control* *ctrl* *<C-*
<M-…> alt-key or meta-key *META* *ALT* *<M-*
<A-…> same as <M-…> *<A-*
<D-…> command-key or "super" key *<D-*
For more details keymappings you can reference to keymappings.lua and which-key.lua which can be opened via Leader Key (Space).
Is there a shortcut for toggling between opened files?
It's just TAB and
Or for searching for a file inside the File-Explorer?
Just use vim search as usual via /
key. For all files search in project use <C-P>
Is it possible to open files next to each other in a split-display?
Yes, in vim by default it's <C-w>v
for vertical and <C-w>s
for horizontal. In ecovim you can use <Leader>v
for vertical split. If you want to open a new file in split from File Explorer or Telescope Files (via <C-P>
) use <C-V>
shortcut on file.
How do you comment out a single line?
Just use gcc
in normal mode. It's described in readme here.
Thanks for the explanation! I'll try those...
Thanks for the keyboard bindings
I want to know how to format a file using prettier. Is there a way to do such using a key bind or shortcut key
@Jrcity If you have Prettier configured with ESLint you can use <Leader>cf
mapping to format.
Can you help me out with your prettier config and how to go about with setting it up. Please.
Can you help me out with your prettier config and how to go about with setting it up. Please.
Unfortunately, it's not related to Ecovim, but in shortcut, you need to get eslint-config-prettier
and eslint-plugin-prettier
in your project and configure it in eslintrc
file. Please refer to google.
Is it ok if I keep these questions going?
console.log(my_var)
?Is it ok if I keep these questions going?
Yep, but all of them are in keymappings.lua and which-key.lua.
How do you achieve code-folding? To fold a long function, for instance...
Type :h E490
. Thanks to treesitter you can fold functions etc. automatically by za
.
Is there a snippet/shortcut for console.log(my_var)?
Yes, with LSP. It's log
snippet. In future versions I will try to implement intelligent console.log with automatic variable completion based on treesitter.
moving a whole block of text up or down N lines?
https://github.com/ecosse3/nvim/blob/master/lua/keymappings.lua#L13-L15
:pray:
How do I read inline warnings and errors from a .tsx or .ts file I was using the keybind gl but it does not seem to work
How do I read inline warnings and errors from a .tsx or .ts file I was using the keybind gl but it does not seem to work
@Jrcity <leader>cl
is the keybinding for that. Feel free to remap for yourself.
Hi, Thanks for this config! Once i updated to the latest neovim, the installer worked perfectly. Now I'm trying to understand your key-bindings. For instance, could you please explain exactly what you mean for:
<C - e>
What keys is that exactly?
Is there a shortcut for toggling between opened files? Or for searching for a file inside the File-Explorer? Is it possible to open files next to each other in a split-display? How do you comment out a single line?
Many thanks!