aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode_visual_edit.coffee
AgeCommit message (Collapse)Author
2016-03-21Rename visual mode file.Stephen Blott
This previous file name was chosen when we (I) had the intention of implementing edit mode too. That initiative has been abandoned, so the file name is inappropriate. Renaming now in preparation for a significant refactoring of visual mode.
2016-03-04Do not use standalone @.Stephen Blott
The styles guide says not to use standalone `@`. So this changes the occurrences I could find (with sed) to `this`. Occurrences within files with major outstanding PRs are omitted.
2016-01-31Wholly remove edit-mode code.Stephen Blott
I am now of the opinion that we should not do this within Vimium, as: - better solutions exist externally, and - it's better to not have to maintain this.
2016-01-26Collapse selection on exiting visual mode.Stephen Blott
This applies only to the case where visual mode is run under edit mode. Previously, we were leaving the selection in place ... which is weird and not vim-like.
2015-10-23Properly check whether the selection is visible in the current viewportmrmr1993
2015-06-25Merge branch 'hud-iframe-input-with-store-all-settings'Stephen Blott
2015-06-23*Always* collapse selection on yank.Stephen Blott
This only affects the transition from visual mode back to edit mode. Previously, we were incorrectly leaving the selection in place. (The comment above was correct, but the implementation wasn't.)
2015-06-13Clean up code after mergemrmr1993
2015-06-13Refactor findInPlace.Stephen Blott
This code belongs together, so we put it together.
2015-06-10Integrate executeFind into FindMode as FindMode.executemrmr1993
2015-06-10Move findModeQuery to FindMode.querymrmr1993
2015-06-10Make find from visual mode behave the same as a normal findmrmr1993
2015-06-10Coffee-ify strings, fix no match regexp search message in visual modemrmr1993
2015-06-10Integrate functions exposed on window into FindModemrmr1993
2015-06-10Use FindMode constructor directly in visual/edit modesmrmr1993
2015-05-29Merge pull request #1610 from smblott-github/word-movement-non-englishStephen Blott
Fix word movement for non-English characters.
2015-04-28Refactor word-movement.Stephen Blott
Since we don't use this huge regexp on most pages, lets just compile it when we need it.
2015-04-28Fix mode indicator for "gi".Stephen Blott
2015-04-28Fix word movement for non-English characters.Stephen Blott
Fixes #1592.
2015-04-19Merge branch 'remove-badges'Stephen Blott
Conflicts: content_scripts/vimium_frontend.coffee
2015-04-18Mode indicator: more fix HUD messages for caret mode.Stephen Blott
2015-04-18Merge pull request #1572 from smblott-github/return-to-viewportStephen Blott
Return to the original viewport (when no find matches)
2015-04-18Selection handling on exiting visual mode.Stephen Blott
Previously, we removed the selection on exiting visual mode. This collapses the selection instead. My own experience with visual mode suggests that this is better. In particular, if we remove the selection, then when the user re-enters visual mode, they're dropped into caret mode. It is unlikely that the default caret position selected by caret mode is better than the last text selected by the user in either caret mode or visual mode.
2015-04-18Mode indicator: initial move to HUD.Stephen Blott
2015-04-18Mode indicator: strip all references to badges.Stephen Blott
2015-02-23Find (from visual mode) returns to viewport on no match.Stephen Blott
The intention here is that, under visual mode, a find query with no matches leaves us at some aribtrary place in the page. Whereas the user was probably looking at the text they're interested in in the viewport to begin with. This PR returns to the original viewport in such cases. (In this commit, return-to-viewport is enabled for *all* finds, not just under visual mode. I want to try it out like this to see what it feels like. This is probably not the right UX. It is not what Chrome does.)
2015-02-12Fix regexp performFind/performBackwardsFindmrmr1993
2015-02-11Fix error on yank/scroll.Stephen Blott
When we exit visual mode with "y"... "y" is a command for visual mode. Currently it clears the selection. Because it's executed as a command, scrollIntoView is called after running the command. Because the selection is cleared, scrollIntoView found nothing to scroll, and was creating an error. So we need to check whether there's anything to scroll into view, before trying to scroll it. Also fix mis-named file in the tests.
2015-02-06Visual/edit modes: code cleanup.Stephen Blott
- convert getCaretCoordinates from JS to CS - handle x axis in scrollIntoView - better comments throughout.
2015-02-05Visual/edit modes: Fix ae1697b6697e24c77fc852b02c760871db995a3f...Stephen Blott
which was broken.
2015-02-05Visual/edit modes: always fully remove the selection on exit from visual mode.Stephen Blott
There's considerable discussion in #1441 as to what we should do with the selection on leaving visual mode. Good arguments have been made as to why we should keep the selection. However, at this point, keep-it-simple seems like the best strategy, and wholly removing the selection (probably) provides fewer ways for the user to shoot themselves in the foot.
2015-02-05Visual/edit modes: visualmode-escape clears selection.Stephen Blott
This effectively reverts 95e086563b918364d3038f6489cc97c73fcb7180 (Escape-Escape clears selection) pending discussion of the right UX around exitng visual mode.
2015-02-04Revert "Visual/edit modes: better (?) guessing for caret mode."Stephen Blott
This reverts commit c1681fea2f2629c6bee1e27c5dfc704d77553d96.
2015-02-03Visual/edit modes: fix bug in event handling.Stephen Blott
2015-02-03Visual/edit modes: better (?) guessing for caret mode.Stephen Blott
When caret mode guesses a selection score text nodes by their visible area and the number of non-whitespace characters they contain. Choose the first non-whitespace character in the highest-scoring node. The intention is to avoid making a poor choice for the initial caret position.
2015-02-02Visual/edit modes: Escape-Escape clears selection.Stephen Blott
2015-02-02Visual/edit modes: WIP, scrolling content editable.Stephen Blott
2015-02-02Visual/edit modes: escape in visual mode clears selection.Stephen Blott
2015-02-02Visual/edit modes: WIP, scrolling content editable.Stephen Blott
2015-02-01Visual/edit modes: tweaks...Stephen Blott
- Collapse to focus when entering caret mode from visual mode.
2015-02-01Visual/edit modes: fine-tune entry/exit logic.Stephen Blott
- When the user exits visual mode via escape, we reinstall the original selection (from launch).
2015-02-01Visual/edit modes: yet another code review.Stephen Blott
2015-01-31Visual/edit modes: exit visual mode on click in input element.Stephen Blott
2015-01-31Visual/edit modes: character-by-character word movements.Stephen Blott
2015-01-31Visual/edit modes: change implementation of vimword.Stephen Blott
2015-01-31Visual/edit modes: change visual-mode start up...Stephen Blott
When visual mode launches and there *is* a selection but it's outside of the viewport, instead of scrolling it into view, ignore it, and start with a visible caret.
2015-01-31Visual/edit modes: rework lexical selection...Stephen Blott
- And drop "J".
2015-01-30Visual/edit modes: re-introduce "dap".Stephen Blott
2015-01-30Visual/edit modes: better "yy", "dd", an so on.Stephen Blott
2015-01-30Visual/edit modes: better "2daw", an so on.Stephen Blott