Comments (9)
Here's a mapping that will load netrw only on demand when using gx:
nnoremap gx :call <sid>open_url()<CR>
function! s:open_url() abort
unlet! g:loaded_netrw
unlet! g:loaded_netrwPlugin
runtime! plugin/netrwPlugin.vim
return netrw#BrowseX(expand('<cfile>'), netrw#CheckIfRemote())
endfunction
from nvim-tree.lua.
My plugin already maps gx globally, so I shouldn't need the original gx in most cases. But I think this should be mentioned in the docs at least, so users don't get a surprise when trying to use gx
outside the tree.
from nvim-tree.lua.
well netrw opens automatically and it can conflict with other trees. I'll try and see if i can come up with a solution.
from nvim-tree.lua.
Well i'm sorry but i cannot enable the netrw, i don't really use the gx
option, if you really want to use it in other buffers, feel free to implement it :) I have to disable netrw because i really have no use for it and its conflicting a lot with my workflow
from nvim-tree.lua.
Can we at least have an option for it? And btw, I'm writing a plugin to replace gx
https://github.com/stsewd/gx-extended.vim if someone hits this, you can just install that plugin and gx should work just as the original gx in most cases.
from nvim-tree.lua.
if you do not disable netrw then it will open every time you do vim $DIR which will not be convenient at all. What would be your use cases to keep netrw ?
from nvim-tree.lua.
Mainly just to keep the original gx
working. I don't use vim $DIR
, so I'm fine if that doesn't work when enabling netrw.
from nvim-tree.lua.
well you can patch it locally if you want, but it seems weird to me that a tree viewer provides that kind of feature anyway. You could provide a global mapper with your gx
plugin and not depend on the gx
behaviour of netrw which would seem more adapted imo.
from nvim-tree.lua.
i'll add that then :)
from nvim-tree.lua.
Related Issues (20)
- If using floating mode and creating a new file the floating window becomes the created file. HOT 2
- Bookmark filter should include parent directory HOT 1
- Bad contrast for NvimTreeWindowPicker & NvimTreeBookmarkHL on default colorscheme HOT 7
- Mappings/functionality discoverability discussion HOT 10
- update_root won't update with respect_buf_cwd when open file HOT 3
- change_root_to_node() does not work on files HOT 1
- how to use one instance in different tab HOT 2
- Sticky nvim-tree and not using window_picker: How to remember the window where navigating into nvim-tree from?
- Quitting neovim takes a long time when toggling git ignore folders HOT 3
- Add winfixbuf to view options HOT 4
- Provide interface to customize the comparing function between two nodes HOT 1
- 0.10 luadoc and lsp integration
- Parent folder deleted when deleting a folder starting with $ HOT 4
- Make it easy to discover useful shortcuts HOT 2
- New File getting opened in floating window. HOT 5
- Module `nvim-tree.renderer.help` not found when install nvim-tree through Lazy HOT 1
- nvim-tree not respecting diagnostics update_in_insert value set by neovim HOT 8
- Float window for full filenames has wrong bg HOT 2
- Floating nvim-tree does not respect config on startup HOT 1
- Right aligned icons HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-tree.lua.