Skip to content
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

Bind g to go to the beginning of the file. #273

Closed
cirosantilli opened this issue Apr 17, 2014 · 10 comments
Closed

Bind g to go to the beginning of the file. #273

cirosantilli opened this issue Apr 17, 2014 · 10 comments

Comments

@cirosantilli
Copy link
Contributor

Every terminal user does this several times every day:

seq 100 | less

Then inside less:

  • search /999
  • oops, not found
  • go back up: g
  • search again: /29

The current g could be relocated to og as proposed on #272, or just swapped with the hard to reach Home key.

@cirosantilli
Copy link
Contributor Author

Another good possibility is we implement #67 is gg by analogy to Vim.

@vivien
Copy link
Contributor

vivien commented Apr 23, 2014

Indeed, if #67 gets done in time, we could easily ship a vim.tigrc and emacs.tigrc with navigation bindings, for the user to source.

@cirosantilli
Copy link
Contributor Author

@vivien That sounds like a great idea. I further propose that we map by analogy to Vim by default, since most people who are looking for terminal solutions like this are more likely to be Vim users already (TODO true?), and that would reduce the number of mappings we have to come up with.

<flamewars> And Vim's bindings are obviously superior. </flamewars> 😈

@Konafets
Copy link

Konafets commented May 6, 2014

+1 for gg

@chenkaie
Copy link

chenkaie commented Jul 9, 2014

Vote for gg
It's really a intuitive mapping for Vimer

@jonhiggs
Copy link

+1 for gg and G to go to the end.

@Angluca
Copy link

Angluca commented Aug 20, 2014

gg +1! Like the vim.

@jonas
Copy link
Owner

jonas commented Mar 11, 2015

With the current master and https://github.com/jonas/tig/blob/master/contrib/vim.tigrc included from your ~/.tigrc, g now works as requested.

Feel free to suggest/PR additional keybindings for contrib/vim.tigrc.

@cirosantilli
Copy link
Contributor Author

:)

@chenkaie
Copy link

Great job

vivien added a commit to vivien/tig that referenced this issue Mar 28, 2015
This commit is a first draft to add more Vim-ish bindings to vim.tigrc,
which are also good examples for multi-key bindings.

Refs jonas#67 jonas#273 jonas#351
chenkaie added a commit to chenkaie/DotFiles that referenced this issue Apr 2, 2015
@jonas jonas modified the milestones: tig-2.2, tig-2.1.1 Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants