I have tried wiping my .vimrc, uninstalling all plugins, updating Vim, trying different shells, etc. but I absolutely can't get 'gx' to work over a given URL. I have used it before and it worked fine, it even use to open up my finder directory if I 'gx'ed on a blank line. I tried running 'gx' over numerous URLs, above them, below them, adding "/" at the end, etc. Still no luck. I am simply at my wits end trying to figure out why it no longer works when it use to. Sometimes it will open a URL in a blank buffer with the buffer name equal to the URL and other times nothing happens. I would be grateful to anyone who actually knew what the hell is going on with this stupid thing.
I am on the latest version of OS X and have the latest version of Vim.
UPDATE
I found the answer to this question but still am not quite sure why it worked and my original approach didn't.
Original Approach
I installed iTerm2 and was forced to set Preferences >Profiles >General >Command >Command >/usr/local/bin/zsh -l
. Even though I ran $ chsh -s /usr/local/bin/zsh
and added /usr/local/bin/zsh
to /etc/shells
, I could not get >Profiles >General >Command >Login (radio button) to work.
I would either get an error message in Terminal or the window would simply flash and disappear in iTerm. However, running my profile command /usr/local/bin/zsh -l
in my mind should have forced the shell to run in login mode (the same mode as my default) but it caused major issues in vim where I couldn't get any shell command or function that relied on shell commands to work (e.g :!ls
, gx
).
ANSWER
Moreover, I finally managed to get everything working perfectly after running chsh -s /bin/bash
(e.g. back to its default). Suddenly, I was able to run both Terminal and iTerm with the radio button for Login checked and all my issues went away. It should be noted that I tried to chsh -s /usr/local/bin/zsh
and received an error that I didn't receive the first time--something about a non-standard login shell.
This wasn't good enough though because I really wanted to use my Homebrew zsh (and bash) shells since they are more current. Finally, I found the answer, I ran sudo dscl . change /users/$USER UserShell /bin/bash /opt/local/bin/zsh
and I was then able to leave the Login radio button checked and actually use -zsh
for the first time without any issues.
NOW MORE QUESTIONS
My questions now are: 1.) Why didn't my original profile command, /usr/local/bin/zsh -l
work as though it was my default Login shell? Aren't they the same (e.g. a login shell is a login shell)? 2.) If I update /etc/shells
with /usr/local/bin/zsh
why would I receive a "non-standard shell error"? 3.) I read the MAN page on dscl
but don't understand how that actually changed my Login shell when chsh -s /new/shell/path
didn't work? 4.) Does ANYBODY really know what the heck is going on here?!
If you are a moderator please let me know if I should break these questions up into different posts but this is sort of a big issue and I can't believe I am the only one who has had this problem as I couldn't find ANY Q & As that thoroughly explained what is going on. Thank you all in advance for your help!
g:netrw_nogx
? – GagnetrwFileHandlers.vim
available? and is it accessible to vim. For me it is in/usr/share/vim/vim74/autoload/netrwFileHandlers.vim
andgx
is working as expected – Carnage$vim -c 'quit' --startuptime startup.log && grep -ih netrw startup.log
which should show something like399.537 001.674 001.674: sourcing /usr/share/vim/vim74/plugin/netrwPlugin.vim
2. Check if theg
+x
key combination is being used by another application. 3. check ifg:netrw_browsex_viewer
is set to some value.E121: Undefined variable: g:netrw_browsex_viewer
would mean that is it not set and default is being used – Carnage