New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open github file/line (website) error #170

Closed
cassiobotaro opened this Issue Jan 20, 2016 · 8 comments

Comments

3 participants
@cassiobotaro
Collaborator

cassiobotaro commented Jan 20, 2016

Requires additional config to work. Look at here, but git url was returning wrong url.

Tried in vim 7.4 and git 1.9.1 and xfce environment

@cassiobotaro

This comment has been minimized.

Collaborator

cassiobotaro commented Feb 5, 2016

Solution in vim 7.4.712, git 2.5.0 and xfce environment:

https://github.com/avelino/vim-bootstrap/blob/master/vim_template/vimrc#L423

- noremap ,o :!echo `git url`/blob/`git rev-parse --abbrev-ref HEAD`/%\#L<C-R>=line('.')<CR> \| xargs open<CR><CR>
+ noremap ,o :!echo `git url`/blob/`git rev-parse --abbrev-ref HEAD`/%\#L<C-R>=line('.')<CR> \| xargs xdg-open<CR><CR>
@avelino

This comment has been minimized.

Owner

avelino commented Feb 5, 2016

+1

@avelino

This comment has been minimized.

Owner

avelino commented Mar 30, 2016

@cassiobotaro send PR pls

@cassiobotaro

This comment has been minimized.

Collaborator

cassiobotaro commented Mar 30, 2016

@avelino Yep. I wiil do it later.

@WilsonChiang

This comment has been minimized.

WilsonChiang commented Mar 30, 2016

Any idea what might cause a 'cannot find directory' error?

@cassiobotaro

This comment has been minimized.

Collaborator

cassiobotaro commented Mar 30, 2016

@WilsonChiang what's your git version?

try this in .gitconfig:

[alias]
    url =! bash -c 'git config --get remote.origin.url | sed -E "s/\\\\.git//g"'
@WilsonChiang

This comment has been minimized.

WilsonChiang commented Mar 30, 2016

@cassiobotaro
Sorry it seems to actually be a /blob//path/to/my/file does not exist error. I think it doesn't know what blob is.

@cassiobotaro

This comment has been minimized.

Collaborator

cassiobotaro commented Apr 12, 2016

@WilsonChiang Maybe #188 can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment