ctaylo21 / jarvis

Dotfiles for a powerful, web development-focused environment powered by Neovim, iTerm2, tmux, and zsh
MIT License
712 stars 135 forks source link

Open file in denite insert/normal mode (New Tab, Vertical and Horizontal Split) #13

Closed jhkersul closed 5 years ago

jhkersul commented 5 years ago

Adding possibility to open file faster using Denite.

When still in insert mode, press:

Added this commands in the command list :)

ctaylo21 commented 5 years ago

I like the idea, but I feel like I might need a more scalable way to handle mappings. For example, I don't use tabs, so that mapping wouldn't be useful for me. Having said that, I would like a way to allow people to define custom mappings while keeping up to date with the repo without forking (if they wanted).

As a side note, I will probably use the vertical split mapping, as that is the one I would use. I will likely tweak it to be:

call denite#custom#map('insert,normal', "<C-v>", '<denite:do_action:vsplit>')

as I will occasionally browse file lists in "normal" mode and I still would like that mapping to work.

jhkersul commented 5 years ago

About splitting shortcut on normal mode, totally agree!

But I'm really interested in something: You don't use tabs? 🤔😱

ctaylo21 commented 5 years ago

Nope! I use the ; mapping to fuzzy find any open file or just browse through them manually, so I don't have any need for tabs. I might potentially merge this in, though. As it's a Denite mapping only, and I do think it's useful. I think I'd just add the addition of the normal mode mapping and it looks good!

jhkersul commented 5 years ago

Sorry for taking this long, but I've made the changes to work in insert/normal mode :)

ctaylo21 commented 5 years ago

Awesome, thank you!

gfsd3v commented 5 years ago

Sorry for bringing this up again, but I'm having a little trouble trying to make this work, when I do CTRL + T from the denite fzf (LEADER + T) I get a "E73: tag stack empty", any ideas on how to fix it ?

ctaylo21 commented 5 years ago

@gfsd3v I think it's a bug after I upgraded Denite to the new version. Can you open a new issue?

gfsd3v commented 5 years ago

@ctaylo21 I don't know if I'm the best suit for that considering that I changed alot the original config.

ctaylo21 commented 5 years ago

@gfsd3v No worries, I can make a bug. I do think it's valid and not related to your custom changes. I don't use those mappings, so I didn't validate them when I had to change how mappings work in the Denite upgrade.