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

Feature request: Implement ^ (by default) #236

Closed
aksr opened this issue Aug 22, 2015 · 6 comments
Closed

Feature request: Implement ^ (by default) #236

aksr opened this issue Aug 22, 2015 · 6 comments

Comments

@aksr
Copy link

aksr commented Aug 22, 2015

Even in old vi, existed '^' cursor motion.

@iamleot
Copy link
Contributor

iamleot commented Aug 22, 2015

Hello aksr,

aksr writes:

Even in old vi, existed '^' cursor motion.
In vimb there is '0' (zero) if you prefer to use the '^' you can add in
your config:

[...]
nmap ^ 0
[...]

HTH!
Ciao,
L.

@aksr
Copy link
Author

aksr commented Aug 22, 2015

I know, thank you. Still, It should be default.

@aksr aksr changed the title Feature request: Implement ^ Feature request: Implement ^ (by default) Aug 22, 2015
@fanglingsu
Copy link
Owner

In my opinion the ^ does not make any sense in vimb. In vi and vim this moves the cursor to the first none blank char on a line, which is very editor related. And there is no direct wa to force webkit to move the cursor onto the right position. OK, may be this could be done by a JavaScript or with some hack in Caret-Mode.
The 0 is more take from pentadactyl than vim, but is a common key to scroll horizontally to the left most position. The ^ isn't a scroll key in vim so I don't see a reason to add this by default.

@aksr
Copy link
Author

aksr commented Aug 23, 2015

Inside the browser, in normal mode, key-mappings (like ^, 0, $) refer to page.
Having that in mind, 0 and $ wouldn't also make sense because they (according to legacy software) refer to line. Also, 0 (e.g. in ed, sam) would put cursor (dot) "before the first line" (meaning: before the first character of the first line). This is also the case with vim in ex mode.
I don't see any contradiction here, vi(m)'s cursor motions in browser, in fact, influence the page not the cursor (and they are not actually cursor motions). For me, this is consistent with other vi(m)-like software.
(Pentadactyl uses both ^ and 0 - vim, too. They do the same thing.)

I felt obliged to defend my seeing of things.
Anyway, I don't mean to impose my will, just thought of this as a convenient, natural thing.

@fanglingsu
Copy link
Owner

I didn't notice that pentadactyl uses also ^ http://5digits.org/help/pentadactyl/buffer.xhtml#^, thank you for the hint. In this case we can add this to vimb too.

fanglingsu added a commit that referenced this issue Aug 23, 2015
Use the ^ to scroll to the absolute left of the document like
pentadactyl does.
@aksr
Copy link
Author

aksr commented Aug 24, 2015

Thank you.

0-wiz-0 pushed a commit to NetBSD/pkgsrc-wip that referenced this issue Dec 18, 2015
Changes:
The new vimb 2.11 is now released. With some new features and important bug
fixes.

I thank following people for providing ideas and patches:

- Benjamin Petrenko
- Chris Salzberg
- Dmitrij D. Czarkoff
- Jiri Marsicek
- Leonardo Taccari
- PLR
- Yutao Yuan

Added

* Added hint-number-same-length option
* VERBOSE flag to Makefile to toggle verbose make on
* `<Esc>` removes selections in normal mode
* Support for multiple configuration profiles. New parameter `-p` or
  `--profile`
* Adds support for contenteditable attribute as input mode trigger
  [#237](fanglingsu/vimb#237)
* Added `^` as normal mode alias of `0`
  [#236](fanglingsu/vimb#236)
* Added :source command to source a config file
* Added path completion for :save command too
* Added closed-max-items option to allow to store more than one closed page

Changed

* Set only required CFLAGS
* Replaced `-Wpedantic` with `-pedantic` CFLAGS for older gcc versions
* Check for focused editable element as soon as possible
* Do not blur the focused element after alt-tabbing
* Show typed text as last completion entry to easily change it
  [#253](fanglingsu/vimb#253)

Fixed

* Fixed [#224](fanglingsu/vimb#224): Wrong URL and
  titles shown in case one or more pages could not be loaded.
* Fixed Makefile install target using -D
* Fixed [#232](fanglingsu/vimb#232): Fixed misplaced
  hint labels on some sites
* Fixed [#235](fanglingsu/vimb#235): Randomly reset
  cookie file
* Fixed none POSIX `echo -n` call
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

3 participants