Git Product home page Git Product logo

atom-vim-mode-plus's Introduction

vim-mode-plus Build Status BountySource

vim-mode improved.

Installation

Install using Atoms package installer

apm install vim-mode-plus

Some Features

These features are very powerful, especially for the power user. Read the following documents to learn how to use them.

Important

You must disable vim-mode to use vim-mode-plus

  • You don't need the following packages since they're built-in to vim-mode-plus:
  • Scope for CSS selector and keymap is different from vim-mode, not compatible.
  • Internal code base is very different. Thus, issues and PRs should be directly sent to vim-mode-plus. DON'T report vim-mode-plus's issues or PRs to the official vim-mode.

From v1.9.0 CoffeeScript based vim-mode-plus extension is no longer supported

  • Now all operations are defined as ES6 class which is NOT extend-able by CoffeeScript.
    • If you have vmp custom operations in your init.coffee, those are no longer working.
    • See CHANGELOG and Wiki for detail.

Thanks

My work is greatly owing to former achievements of the original vim-mode developers and many of its contributors.
As you can see in the commit history, this project was originally started by forking official vim-mode.
The great design to achieve Vim operation by composing operator with target (motion, text-object) on top of operationStack still lives in vim-mode-plus now.
I don't think I can find this idea by myself from nothing.
Sincerely, I feel I couldn't do anything without the original vim-mode.

Issue report

Whats this?

Fork of vim-mode. Started on 2015.8.1.

  • Many bug fixes.
  • Refactoring: Rewritten almost every line of code.
  • Highlight search
  • visual-blockwise built-in
  • Incremental search by incrementalSearch setting (disabled by default).
  • Cursor visible in all visual-mode (characterwise, blockwise, linewise).
  • Maintain the same cursor position after operations (e.g y, gU) by stayOnYank, stayOnOperate setting. (disabled by default)
  • Lots of new motions like move-up-to-edge, move-down-to-edge. (Mapped to [ and ], Aggressive decision.)
  • Surround built-in. Powerful AnyPair family (change-surround-any-pair operator, inner-any-pair text-object) to detect pair automatically.
  • Set cursor position to start of change on undo or redo by enabling setCursorToStartOfChangeOnUndoRedo (enabled by default. Atom's default is end of change).
  • Allow super granular keymap which is only effective when specific operation is pending like yank-pending, delete-pending. #215
  • And more...

FAQ

Search Q&A label on issues.

Why fork? why not directly contribute to official vim-mode?

  • Changes are too big.
  • I felt many features are too experimental to merge to the official vim-mode.

Behavior different from pure Vim?

Some behaviors are intentionally have different default behaviors. See DifferencesFromPureVim for details.

In visual-block mode, some motions make the editor slow, freeze.

Not freezing, it's just VERY slow.
You can workaround by disabling some keymap. See #214.

ex-mode?

Want to suppress autocomplete-plus's auto suggestion except insert-mode.

Set suppressActivationForEditorClasses autocomplete-plus's config to following value.

vim-mode-plus.normal-mode, vim-mode-plus.visual-mode, vim-mode-plus.operator-pending-mode, vim-mode-plus.insert-mode.replace

If you want to directly edit config.cson, here it is.

"autocomplete-plus":
  suppressActivationForEditorClasses: [
    "vim-mode-plus.normal-mode"
    "vim-mode-plus.visual-mode"
    "vim-mode-plus.operator-pending-mode"
    "vim-mode-plus.insert-mode.replace"
  ]

Flash effect does not appear on cursor-line, occurrence-marker is not displayed on cursor-line either.

This is because of the syntax-theme you are using. See this tips on Wiki.

Surround not work

No default keymaps are provided. If you want, install vim-mode-plus-keymaps-for-surround

How can I insert single white space when surround?

Set Characters To Add Space On Surround. from vim-mode-plus's setting.

I want to automatically disable IME when leaving insert-mode.(want set imdisable equivalent in pure-Vim).

Now in-eval phase for this experimental feature.
From vim-mode-plus's settings-view set autoDisableInputMethodWhenLeavingInsertMode to true(default false).

This feature doesn't actually disable IME, its' just set readonly attribute to editor's hidden input element.
It should work for most IME but some Chinese IME still type multibyte character even in readonly input.
For detail, see this discussion.

Wiki

Keymap

vim-mode-plus has many advanced, experimental features but most of them have no default keymap.
If you want to use the full power of vim-mode-plus, see and experiment with each keymap, command in following links.

Helper packages

Below is list of my packages which provide more vim-like experience.
Why I don't build in these features? Because it takes more time and some features are useful for non-vim user.

  • cursor-history provides c-i, c-o to go/back in the cursor position history.
  • open-this provides gf to open file under cursor.
  • clip-history Does not exist in pure Vim, provides clip-board history you can pop yanked text until you get result you want.
  • choose-pane Does not exist in pure Vim, provides keyboard navigation between panes/panels by choosing it by label.
  • keystroke Keystrokes to keystroke keyamp in you keymap.cson.

References

Vim official

Other

Commit emoji convention

  • ๐Ÿ“ Add comment or doc
  • ๐ŸŽ New feature.
  • ๐Ÿ› Bug fix.
  • ๐Ÿ’ฃ Breaking compatibility.
  • โœ… Write test.
  • ๐Ÿ”ฅ Remove something.
  • ๐Ÿบ I'm happy like reduced code complexity.

atom-vim-mode-plus's People

Contributors

abijr avatar anthonysandrin avatar bronson avatar carlosdcastillo avatar chadkouse avatar ciarand avatar coolwanglu avatar danzimm avatar dcalhoun avatar e-jigsaw avatar eddieantonio avatar ftwillms avatar hitsmaxft avatar iamjwc avatar isaachess avatar jacekkopecky avatar jcurtis avatar jlord avatar jspahrsummers avatar kevinsawicki avatar klorenz avatar maxbrunsfeld avatar mcolyer avatar mnquintana avatar roryokane avatar sknoslo avatar t9md avatar tony612 avatar ymendel avatar zenhob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-vim-mode-plus's Issues

Redo should always leave cursor at beginning of change.

See corresponding issue here: atom/vim-mode#342

Undo/redo is critical to matching the feel of Vim.

Specifically, open a document, press insert i, and start typing a very long paragraph. Make sure you press several newlines as well. Then hit escape. Undo the change and redo it - take note of where your cursor is left when undoing/redoing.

Another nuance: try the same thing, but instead of pressing i to begin inserting, try pressing o to "open" a line. You'll notice that redo leaves your cursor position where the cursor was at the time you pressed o.

Thank you.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Extra new line created when using p or P after line-wise yank

When i do a line-wise yank (either by using yy or making a selection in line-wise visual mode then yanking) then a put operation, either before or after, it not only puts what I have yanked but it will be appended with an extra new line. For example:

int main() {
    printf("Hello World!"); /* If I use yy on this line */
}

Using put-after
Key sequence: yyp
I get

int main() {
    printf("Hello World!"); /* original line */
    printf("Hello World!"); /* put line */
    /* Extra new line here */
}

Using put-after
Key sequence: yyP
I get

int main() {
    printf("Hello World!"); /* put line */
    /* Extra new line here */
    printf("Hello World!"); /* original line */
}

Should not permit mouse clicking beyond last line character.

In Vim, you cannot move the cursor past the final character. In MacVim, accordingly, you cannot click beyond the final character. In atom-vim-mode-plus, the cursor movement is correct, but then the mouse behavior does not match. It's one of those minor "cracks in the seam" that reminds you it's not Vim and likely easy to fix.

Uncaught TypeError when inserting / putting from numbered register

This problem does not occur with alphabetic registers. I think it is across all retrieval commands associated with registers.

Repro:

  1. Put something into a numbered register (e.g. "1yy)
  2. Enter insert mode
  3. Insert from register in insert mode (ctrl-r)
  4. Observe error

Atom Version: 1.0.11-278e988
System: Mac OS X 10.10.5
Thrown From: vim-mode-plus package, v0.1.0

Stack Trace

Uncaught TypeError: Cannot read property 'text' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:773

TypeError: Cannot read property 'text' of undefined
  at InsertRegister.execute (/Users/tommunro/github/atom-vim-mode-plus/lib/insert-mode.coffee:16:45)
  at OperationStack.module.exports.OperationStack.process (/Users/tommunro/github/atom-vim-mode-plus/lib/operation-stack.coffee:79:10)
  at vimState.input.readInput.onConfirm (/Users/tommunro/github/atom-vim-mode-plus/lib/base.coffee:62:34)
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at InputBase.confirm (/Users/tommunro/github/atom-vim-mode-plus/lib/input.coffee:79:16)
  at /Users/tommunro/github/atom-vim-mode-plus/lib/input.coffee:30:10
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:236:32
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at DisplayBuffer.module.exports.DisplayBuffer.emitDidChange (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:313:20)
  at DisplayBuffer.module.exports.DisplayBuffer.updateScreenLines (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1592:19)
  at DisplayBuffer.module.exports.DisplayBuffer.handleTokenizedBufferChange (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1551:12)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:5:61
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TokenizedBuffer.module.exports.TokenizedBuffer.handleBufferChange (/Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:404:27)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:64:24
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.applyChange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:648:20)
  at TextBuffer.module.exports.TextBuffer.setTextInRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:553:12)
  at Selection.module.exports.Selection.insertText (/Applications/Atom.app/Contents/Resources/app.asar/src/selection.js:472:43)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:745:29
  at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:787:29
  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:768:18)
  at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1168:26)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:781:24
  at TextEditor.module.exports.TextEditor.mergeSelections (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2033:43)
  at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1999:35)
  at TextEditor.module.exports.TextEditor.mutateSelectedText (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:779:19)
  at TextEditor.module.exports.TextEditor.insertText (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:742:19)
  at TextEditorComponent.module.exports.TextEditorComponent.onTextInput (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:435:35)
  at HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:3:61)

Commands

     -1:04.8.0 core:cancel (atom-text-editor.editor.vim-mode-input.mini.is-focused)
     -1:04.3.0 editor:consolidate-selections (atom-text-editor.editor.vim-mode-input.mini.is-focused)
     -1:04.3.0 core:cancel (atom-text-editor.editor.vim-mode-input.mini.is-focused)
     -1:04.2.0 editor:consolidate-selections (atom-text-editor.editor.vim-mode-input.mini.is-focused)
     -1:04.2.0 core:cancel (atom-text-editor.editor.vim-mode-input.mini.is-focused)
     -1:00.7.0 vim-mode:activate-normal-mode (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
  2x -1:00.1.0 vim-mode:reset-normal-mode (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:43.4.0 find-and-replace:show (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:23 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:23 core:cancel (atom-text-editor.editor.mini.is-focused)
  3x -0:22 vim-mode:move-down (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:19.2.0 vim-mode:set-register-name (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
  2x -0:12.9.0 vim-mode:yank (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:08.4.0 vim-mode:insert-below-with-newline (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:06.0 core:backspace (atom-text-editor.editor.vim-mode.is-focused.insert-mode.autocomplete-active)
     -0:05.6.0 vim-mode:insert-register (atom-text-editor.editor.vim-mode.is-focused.insert-mode)

Config

{
  "core": {
    "destroyEmptyPanes": false,
    "themes": [
      "one-light-ui",
      "solarized-light-syntax"
    ],
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_STORE",
      "._*",
      "Thumbs.db",
      ".png",
      ".prefab",
      ".scene",
      ".meta"
    ],
    "packagesWithKeymapsDisabled": [
      "omnisharp-atom",
      "advanced-new-file",
      "recent-files-fuzzy-finder"
    ],
    "disabledPackages": [
      "vim-mode",
      "isearch"
    ]
  },
  "vim-mode-plus": {
    "enableHoverIndicator": true,
    "enableHoverIcon": true,
    "stayOnTransformString": true,
    "enableHoverSearchCounter": true,
    "enableIncrementalSearch": true,
    "useSmartcaseForSearch": true
  }
}

Installed Packages

# User
.bin, vundefined
atom-typescript, v6.0.17
atom-yeoman, v0.3.14
clipboard-plus, v0.5.1
cursor-history, v0.4.18
custom-search, v0.0.1
fuzzy-finder, v0.89.0
json-schema, v0.1.13
language-csharp, v0.10.0
linter, v1.6.0
linter-coffeelint, v1.1.0
omnisharp-atom, v0.23.0
recent-files-fuzzy-finder, v0.2.0
remember-file-positions, v0.1.5
save-session, vundefined
symbols-tree-view, v0.10.0
theme-switcher, v1.1.0
vim-mode-clipboard-plus, v0.1.0
vim-mode-plus, v0.1.0

# Dev
find-and-replace, v0.175.0
omnisharp-atom, v0.22.5
settings-view, v0.219.0

ex-mode

Hi,

i like your plugin. For me it works better than vim-mode. The only thing i miss is ex-mode because i am used to doing :linenumber or :50% to jump to move around. Is this planned ? is there something already available ?

Uncaught TypeError: Cannot read property 'marker' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.19
System: Mac OS X 10.10.5
Thrown From: vim-mode-plus package, v0.1.3

Stack Trace

Uncaught TypeError: Cannot read property 'marker' of undefined

At /Users/marcoslh/.atom/packages/vim-mode-plus/lib/vim-state.coffee:159

TypeError: Cannot read property 'marker' of undefined
  at BlockwiseMoveDown.VisualBlockwise.isReversed (/Users/marcoslh/.atom/packages/vim-mode-plus/lib/visual-blockwise.coffee:35:17)
  at BlockwiseMoveDown.isForward (/Users/marcoslh/.atom/packages/vim-mode-plus/lib/visual-blockwise.coffee:78:10)
  at BlockwiseMoveDown.execute (/Users/marcoslh/.atom/packages/vim-mode-plus/lib/visual-blockwise.coffee:84:9)
  at OperationStack.module.exports.OperationStack.process (/Users/marcoslh/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:80:10)
  at /Users/marcoslh/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:33:8
  at OperationStack.module.exports.OperationStack.withLock (/Users/marcoslh/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:38:7)
  at OperationStack.module.exports.OperationStack.push (/Users/marcoslh/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:32:6)
  at atom-text-editor.commands.(anonymous function) (/Users/marcoslh/.atom/packages/vim-mode-plus/lib/vim-state.coffee:156:29)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:184:20)

Commands

     -0:38.3.0 vim-mode-plus:move-down (atom-text-editor.editor.vim-mode-plus.reversed.is-focused.normal-mode)
  7x -0:37.7.0 vim-mode-plus:move-up (atom-text-editor.editor.vim-mode-plus.reversed.is-focused.normal-mode)
  2x -0:35.8.0 vim-mode-plus:move-down (atom-text-editor.editor.vim-mode-plus.reversed.is-focused.normal-mode)
  3x -0:35.1.0 vim-mode-plus:move-up (atom-text-editor.editor.vim-mode-plus.reversed.is-focused.normal-mode)
  3x -0:34.3.0 vim-mode-plus:move-left (atom-text-editor.editor.vim-mode-plus.reversed.is-focused.normal-mode)
     -0:31.3.0 vim-mode-plus:activate-blockwise-visual-mode (atom-text-editor.editor.vim-mode-plus.reversed.is-focused.normal-mode)
  5x -0:30.5.0 vim-mode-plus:blockwise-move-down (atom-text-editor.editor.vim-mode-plus.reversed.is-focused.visual-mode.blockwise)
 20x -0:28.7.0 vim-mode-plus:move-right (atom-text-editor.editor.vim-mode-plus.is-focused.visual-mode.blockwise)
     -0:26 vim-mode-plus:move-left (atom-text-editor.editor.vim-mode-plus.is-focused.visual-mode.blockwise)
     -0:19.8.0 vim-mode-plus:change (atom-text-editor.editor.vim-mode-plus.is-focused.visual-mode.blockwise)
     -0:16.5.0 vim-mode-plus:activate-normal-mode (atom-text-editor.editor.vim-mode-plus.is-focused.insert-mode.autocomplete-active)
     -0:16.2.0 vim-mode-plus:undo (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
 20x -0:14.3.0 vim-mode-plus:move-left (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
     -0:05.8.0 vim-mode-plus:activate-blockwise-visual-mode (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
 13x -0:05.2.0 vim-mode-plus:move-right (atom-text-editor.editor.vim-mode-plus.is-focused.visual-mode.blockwise)
  2x -0:02.6.0 vim-mode-plus:blockwise-move-down (atom-text-editor.editor.vim-mode-plus.is-focused.visual-mode.blockwise)

Config

{
  "core": {
    "disabledPackages": [
      "symbols-view"
    ],
    "themes": [
      "seti-ui",
      "base16-tomorrow-dark-theme"
    ]
  }
}

Installed Packages

# User
atom-ctags, v4.3.0
atom-django, v0.3.0
color-picker, v2.0.12
django-templates, v0.5.0
editorconfig, v1.2.0
emmet, v2.3.12
git-log, v0.4.1
git-tab-status, v1.9.2
language-matlab, v0.1.1
linter, v1.6.0
linter-flake8, v1.6.1
linter-jscs, v3.0.0
linter-jshint, v1.2.0
linter-python-pep8, v0.2.0
node-debugger, v1.1.8
pigments, v0.15.0
pretty-json, v0.4.1
remote-sync, v3.1.2
seti-ui, v0.8.0
symbols-tree-view, v0.10.0
vim-mode-plus, v0.1.3

# Dev
No dev packages

selection dimensions in visual mode

First, thank you for the package--it seems to be working very nicely.

In Atom, when selecting text, the status bar at the bottom shows the line and character count of the selection in parenthesis. For example: (1,7) to indicate that the current selection is 1 line tall and contains 7 characters. In Visual Character mode, the dimensions seem accurate, but in vim-mode-plus's Visual Line and Visual Block modes, the line count appears to be off (in two different ways).

Using V to select the current line gives a line count of 2. Selecting two lines in Visual Line mode gives a line count of 3, and so forth. The character count appears correct, assuming that the newline characters count as 1, but the line count is one number too high.

Using Ctrl+v to enter Visual Block mode, though, always produces a line count of 1, no matter how many lines the block selection spans. The second number in the tuple, the character count, is equal to the width of the selection, not the total number of characters.

The behavior in Visual Line mode seems reasonable, except for the line count being one number too high. The behavior in Visual Block mode also seems reasonable, except for the line count always being one. Having the character count be the width of the selection (instead of total number of characters) in this mode seems right to me, and mimics Vim's behavior for block selections which is represented as height x width.

Thanks!

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

shift from visual-char-to-visual-block select incorrect row

Issue happen when you select following rows like vllljj then ctrl-v.
Note, 2nd row is blank. cursor position is at |.
Result: selection should be on line-1 and line3
Actual: selection is on line-1 and line-3, and line-4

****|********************

*************************
*************************

This is because current implementation not care moving direction have chars to select.
addSelectionAbove addSelectionBelow used in visualBlock selection skip blank row, so I have to calculate appropriate amount of call to these methods.

Change inner word eats extra character in some cases

Thanks for all of your work on this plugin! Happy to contribute if you point me in the right direction.

Here's my bug, [ ] denotes normal cursor position, | denotes insert cursor position:
foo([b]ar) then issue ciw for change-inner-word
Result:
foo|)

What's really annoying is inserting the eaten parentheses results in foo())

Redo may open completion window.

Open a JS file:

  • Include the text fn (with a space after it).
  • cw and change the text to fun.
  • escape.
  • undo
  • redo

The completion window opens after redo because you're after a snippet trigger (fun) but you're in normal mode, not insert mode so the completions should never open.

Startup time:

atom-vim-mode-plus adds about 200ms to startup time to atom. It's definitely worth it! I would not use atom if it were not for this plugin. However, is there anything you can think of to improve startup time? (This is low priority, but I thought I'd mention it).

Keybinding for french keyboard

Hi,
There is a problem with keybindings on AZERTY keyboard. For example to hit "/" we need the shift key. So it seems that the package doesn't resolve the shortcut (keybinding resolver tells I'm hitting shift+/)

That's probably why I cannot use the search, visual block and so on...

Note: I installed and setup keyboard-localization package for french

Paste fails.

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.0-beta6
System: Mac OS X 10.10.3
Thrown From: 'atom-vim-mode-plus' package, vundefined

Stack Trace

Uncaught TypeError: fn is not a function

At /Users/jwalke/.atom/packages/atom-vim-mode-plus/lib/operation-stack.coffee:41

TypeError: fn is not a function
  at PutAfter.Operator.flash (/Users/jwalke/.atom/packages/vim-mode-plus/lib/operator.coffee:66:7)
  at PutAfter.PutBefore.pasteLinewise (/Users/jwalke/.atom/packages/vim-mode-plus/lib/operator.coffee:492:6)
  at /Users/jwalke/.atom/packages/vim-mode-plus/lib/operator.coffee:6:61
  at /Users/jwalke/.atom/packages/vim-mode-plus/lib/operator.coffee:472:7
  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:798:18)
  at TextEditor.module.exports.TextEditor.transact (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/text-editor.js:1202:26)
  at PutAfter.PutBefore.execute (/Users/jwalke/.atom/packages/vim-mode-plus/lib/operator.coffee:471:13)
  at OperationStack.process (/Users/jwalke/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:73:8)
  at OperationStack.run (/Users/jwalke/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:23:8)
  at run (/Users/jwalke/.atom/packages/vim-mode-plus/lib/base.coffee:14:27)
  at atom-text-editor.<anonymous> (/Users/jwalke/.atom/packages/vim-mode-plus/lib/base.coffee:137:38)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
  at /Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:533:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
  at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/window-event-handler.js:99:36)
  at HTMLDocument.<anonymous> (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:30.3.0 pane:show-next-item (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:30.3.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:29.4.0 vim-mode-plus:insert-after (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:25.5.0 vim-mode-plus:activate-normal-mode (atom-text-editor.editor.vim-mode-plus.is-focused.insert-mode)
     -0:25.1.0 core:save (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
  2x -0:24.4.0 vim-mode-plus:yank (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
     -0:24.2.0 vim-mode-plus:put-after (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
     -0:23.3.0 vim-mode-plus:yank (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
  3x -0:19.4.0 blur (atom-text-editor.editor.vim-mode-plus.is-focused.operator-pending-mode)
     -0:18.8.0 core:save (atom-text-editor.editor.vim-mode-plus.operator-pending-mode.is-focused)
     -0:17.8.0 vim-mode-plus:move-up (atom-text-editor.editor.vim-mode-plus.operator-pending-mode.is-focused)
     -0:17.7.0 vim-mode-plus:move-down (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
     -0:17.5.0 core:save (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
  2x -0:17.2.0 vim-mode-plus:yank (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
     -0:16 vim-mode-plus:put-after (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
  2x -0:14.2.0 blur (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)

Config

{
  "core": {
    "audioBeep": false,
    "disabledPackages": [
      "minimap-selection",
      "nuclide-toolbar",
      "nuclide-debugger-atom",
      "nuclide-debugger-hhvm",
      "nuclide-debugger-lldb",
      "nuclide-test-runner",
      "nuclide-remote-projects",
      "wrap-guide",
      "atom-html-preview",
      "whitespace"
    ],
    "followSymlinks": false
  }
}

Installed Packages

# User
language-ocaml, v1.1.2
language-swift, v0.4.0
markdown-preview-opener, v0.1.1
toggle-gutter, v0.2.2
vim-mode-plus, v0.6.0

# Dev
No dev packages

motion j, k broken?

when selection area is bigger than editors height(editor.getHeigh()), shrinking selection from head position always scroll to selection head.

This is another issue started from Atom v1.1.0(not sure)

How to reproduce

  1. open text editor which have enough lines to scroll.
  2. select whole buffer with cmd-a or vae
  3. repat k to shrink selection to upper direction.
  4. each time you type k, editor scroll to selection head(=first line of buffer).
    Using shift-up instead of k won't cause this issue.

May be happening on logic in operation-stack.coffee?

use TextBuffer::onDidChange event for Input class

Currently Input class in input.coffee observe TextEditor::onDidChange event but it have no information which text is newText.

  • use editor.buffer.onDidChange event to only inform newText only.
  • remove unnecessary hover text modification(or similar text adjustment) to extract newText from whole text.
  • currently Input::onDidChange event not fired if confirmed, but make it each object's choice, fire event if it actually changed, be consistent. this allow oneCharInput-require operation show input text on hover(currently onCharInput-require operation never show inputted text on hover since its Confirmed with oneChar and onDidChange event is not fired if Confirmed.)

providing common command to compliment ex-mode.

Use ex-mode. It's work well from [email protected].


  • I created yet another vim-mode-plus-ex-mode before ex-mode support vim-mode-plus.
  • But I have no motivation to improve this my vim-mode-plus-ex-mode package, my thought is explained here #52.

Updated at 2017.05.25, since this is still very frequently accessed






Original issue comment

Many of former vim-mode user seem to use ex-mode.
But I'm not motivated to use different command prompt in one editor(Atom already have native command-palette feature as explained in #32).

Instead of providing independent command-mode( ex-mode ) to mimic pure Vim,
I want to gather information from ex-mode user for "what operation you are using frequently in ex-mode?".

Based on that information I can make those command via command-palette.
For example I locally using custom user command which toggle line-wrap.
I can include it as xxxxx to be able to toggle wrap from command-palette.
What other commands you guys make it available as command, put this discussion.

Introduce event onDidChange, onDidSelect to cleanly track mutation and selection

Currently operator.coffee to imperative way to flash mutated range.
But when I try to introduce [, ] marker to store last changed start and end position which is updated on text mutation, it is difficult without introducing mess to the code.

So in this issue, I'll try to implement onDidChange, onDidSelect event on vimState.
Then I'll use to those event to flash and update last changed position marker [, ].
This event system could be used to further simplification of code and support another feature.

Need spec

This is placeholder to put TODO for spec related

  • MoveToLineByPercent motion
  • activate-previous-visual-mode
  • increase/decrease from visual-mode
  • Need refactoring spec-helper.coffee mini DSL its getting mess.

Uncaught TypeError: Cannot convert undefined or null to object

[Enter steps to reproduce below:]

  1. On the Atom beta
  2. Try searching for anything.

Atom Version: 1.3.0-beta5
System: Mac OS X 10.10.3
Thrown From: vim-mode-plus package, v0.4.0

Stack Trace

Uncaught TypeError: Cannot convert undefined or null to object

At /Users/me/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:22

TypeError: Cannot convert undefined or null to object
    at Function.keys (native)
    at MarkerLayer.module.exports.MarkerLayer.findMarkers (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-layer.js:133:21)
    at DisplayBuffer.module.exports.DisplayBuffer.findFoldMarkers (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/display-buffer.js:1143:36)
    at saveEditorState (/Users/me/.atom/packages/vim-mode-plus/lib/utils.coffee:37:40)
    at Search.initialize (/Users/me/.atom/packages/vim-mode-plus/lib/motion.coffee:705:29)
    at Search.Base (/Users/me/.atom/packages/vim-mode-plus/lib/base.coffee:31:6)
    at Search.Motion [as constructor] (/Users/me/.atom/packages/vim-mode-plus/lib/motion.coffee:17:3)
    at SearchBase [as constructor] (/Users/me/.atom/packages/vim-mode-plus/lib/motion.coffee:589:3)
    at new Search (/Users/me/.atom/packages/vim-mode-plus/lib/motion.coffee:700:3)
    at OperationStack.run (/Users/me/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:20:17)
    at run (/Users/me/.atom/packages/vim-mode-plus/lib/base.coffee:12:27)
    at atom-text-editor.<anonymous> (/Users/me/.atom/packages/vim-mode-plus/lib/base.coffee:115:38)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:533:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/window-event-handler.js:99:36)
    at HTMLDocument.<anonymous> (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -1:46.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:46.3.0 blur (atom-text-editor.editor.mini.is-focused)
     -1:46.3.0 timecop:view (atom-text-editor.editor.hidden-gutters.vim-mode-plus.normal-mode)
 36x -1:46.2.0 blur (atom-text-editor.editor.hidden-gutters.vim-mode-plus.normal-mode)
     -0:43.3.0 settings-view:open (div.pane-item.native-key-bindings.about)
 16x -0:43.3.0 blur (div.pane-item.native-key-bindings.about)
     -0:03.5.0 pane:show-previous-item (div.panels-item)
     -0:03.5.0 blur (div.panels-item)
     -0:03.3.0 pane:show-previous-item (div.pane-item.native-key-bindings.about)
     -0:03.3.0 blur (div.pane-item.native-key-bindings.about)
     -0:02.9.0 pane:show-previous-item (div.timecop.pane-item.native-key-bindings)
     -0:02.9.0 blur (div.timecop.pane-item.native-key-bindings)
  3x -0:01.3.0 vim-mode-plus:move-up (atom-text-editor.editor.hidden-gutters.vim-mode-plus.normal-mode.is-focused)
     -0:01.0 vim-mode-plus:search (atom-text-editor.editor.hidden-gutters.vim-mode-plus.normal-mode.is-focused)
     -0:00.7.0 vim-mode-plus:mark (atom-text-editor.editor.hidden-gutters.vim-mode-plus.normal-mode.is-focused)
     -0:00.7.0 blur (atom-text-editor.editor.hidden-gutters.vim-mode-plus.normal-mode.is-focused)

Config

{
  "core": {
    "audioBeep": false,
    "disabledPackages": [
      "minimap-selection",
      "nuclide-toolbar",
      "nuclide-debugger-atom",
      "nuclide-debugger-hhvm",
      "nuclide-debugger-lldb",
      "nuclide-test-runner",
      "nuclide-remote-projects",
      "wrap-guide",
      "atom-html-preview"
    ]
  },
  "vim-mode-plus": {
    "incrementalSearch": true,
    "flashOnSearch": false,
    "useClipboardAsDefaultRegister": true,
    "useSmartcaseForSearch": true,
    "flashOnOperate": false,
    "flashScreenOnSearchHasNoMatch": false
  }
}

Installed Packages

# User
language-ocaml, v1.1.2
language-swift, v0.4.0
markdown-preview-opener, v0.1.1
toggle-gutter, v0.2.2
vim-mode-plus, v0.4.0

# Dev
No dev packages

Failed to load the vim-mode-plus package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.19
System: Microsoft Windows 10 Pro
Thrown From: vim-mode-plus package, v0.1.6

Stack Trace

Failed to load the vim-mode-plus package

At Cannot find module 'emoji-images'

Error: Cannot find module 'emoji-images'
  at Module._resolveFilename (module.js:334:15)
  at Function.Module._resolveFilename (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\module-cache.js:383:52)
  at Function.Module._load (module.js:284:25)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (C:\Users\ะŸะตั‚ั\.atom\packages\vim-mode-plus\lib\hover.coffee:4:9)
  at Object.<anonymous> (C:\Users\ะŸะตั‚ั\.atom\packages\vim-mode-plus\lib\hover.coffee:3:1)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .coffee] (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (C:\Users\ะŸะตั‚ั\.atom\packages\vim-mode-plus\lib\vim-state.coffee:4:11)
  at Object.<anonymous> (C:\Users\ะŸะตั‚ั\.atom\packages\vim-mode-plus\lib\vim-state.coffee:1:1)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .coffee] (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Object.<anonymous> (C:\Users\ะŸะตั‚ั\.atom\packages\vim-mode-plus\lib\main.coffee:5:12)
  at Object.<anonymous> (C:\Users\ะŸะตั‚ั\.atom\packages\vim-mode-plus\lib\main.coffee:2:1)
  at Module._compile (module.js:428:26)
  at Object.defineProperty.value [as .coffee] (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at Package.module.exports.Package.requireMainModule (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package.js:761:34)
  at C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package.js:192:28
  at Package.module.exports.Package.measure (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package.js:169:15)
  at Package.module.exports.Package.load (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package.js:183:12)
  at PackageManager.module.exports.PackageManager.loadPackage (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package-manager.js:405:14)
  at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\package-manager.js:485:30)
  at C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\settings-view\lib\package-manager.js:371:29
  at exit (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\settings-view\lib\package-manager.js:60:16)
  at triggerExitCallback (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\buffered-process.js:213:47)
  at ChildProcess.<anonymous> (C:\Users\ะŸะตั‚ั\AppData\Local\atom\app-1.0.19\resources\app.asar\src\buffered-process.js:235:18)
  at emitTwo (events.js:87:13)
  at ChildProcess.emit (events.js:172:7)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

     -1:50.3.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
     -1:48.9.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -1:48.9.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -1:47.2.0 core:undo (atom-text-editor.editor.is-focused)
     -1:46.7.0 core:save (atom-text-editor.editor.is-focused)
     -1:45.9.0 core:close (atom-text-editor.editor.is-focused)
     -1:45.2.0 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -1:44.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -1:42.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:42.7.0 settings-view:open (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:59.4.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:59.4.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:56.9.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:56.6.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)
  2x -0:47.1.0 core:cancel (table.package-keymap-table.table.native-key-bindings.text)
     -0:34.6.0 core:select-all (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
laravel, v0.7.0
vim-mode-plus, v0.1.6

# Dev
No dev packages

Question: What does this TODO item mean?

Don't change cursor position after yank, indent, toggle(break compatibility to Vim, but I thinks this is bettter).

I checked, and it seems that this plugin matches Vim's behavior. I like the fact that it matches Vim's behavior.

Uncaught TypeError: op.execute is not a function when executing A Function, Inner Function

  1. Open a file (I used .cs and .coffee to test)
  2. Navigate to the body of a function
  3. Use command palette to invoke vim-mode-plus:a-function or Inner Function
  4. Observe type error

It's also possible I'm just not sure how to invoke this. I tried to invoke it in operator pending mode as well, but got no result.

Atom Version: 1.0.19-5f4f6d2
System: Mac OS X 10.10.5
Thrown From: vim-mode-plus package, v0.1.1

Stack Trace

Uncaught TypeError: op.execute is not a function

At /Users/tommunro/.atom/packages/vim-mode-plus/lib/vim-state.coffee:159

TypeError: op.execute is not a function
  at OperationStack.module.exports.OperationStack.process (/Users/tommunro/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:79:10)
  at /Users/tommunro/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:32:8
  at OperationStack.module.exports.OperationStack.withLock (/Users/tommunro/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:37:7)
  at OperationStack.module.exports.OperationStack.push (/Users/tommunro/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:31:6)
  at atom-text-editor.commands.(anonymous function) (/Users/tommunro/.atom/packages/vim-mode-plus/lib/vim-state.coffee:156:29)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)
  at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
  at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:184:20)

Commands

     -0:16.8.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:13.5.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:13.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  4x -0:13.2.0 blur (atom-text-editor.editor.mini.is-focused)
     -0:12.6.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:12.6.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
  2x -0:11.5.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:09.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  4x -0:09.6.0 blur (atom-text-editor.editor.mini.is-focused)
  8x -0:07.5.0 vim-mode-plus:move-down (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:05.8.0 command-palette:toggle (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:05.5.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:04.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:04.0 blur (atom-text-editor.editor.mini.is-focused)
     -0:04.0 vim-mode-plus:a-function (atom-text-editor.editor.vim-mode-plus.normal-mode)
     -0:01.9.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "solarized-light-syntax"
    ],
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_STORE",
      "._*",
      "Thumbs.db",
      ".png",
      ".prefab",
      ".scene",
      ".meta"
    ],
    "packagesWithKeymapsDisabled": [
      "omnisharp-atom",
      "advanced-new-file",
      "recent-files-fuzzy-finder"
    ],
    "disabledPackages": [
      "vim-mode",
      "isearch"
    ]
  },
  "vim-mode-plus": {
    "enableIncrementalSearch": true,
    "showHoverOnOperate": true,
    "showHoverSearchCounter": true,
    "useSmartcaseForSearch": true,
    "incrementalSearch": true,
    "stayOnTransformString": true
  }
}

Installed Packages

# User
.bin, vundefined
atom-yeoman, v0.3.14
clipboard-plus, v0.5.1
cursor-history, v0.4.18
custom-search, v0.0.1
fuzzy-finder, v0.90.0
json-schema, v0.1.13
language-csharp, v0.10.0
linter, v1.6.0
linter-coffeelint, v1.1.0
omnisharp-atom, v0.24.14
recent-files-fuzzy-finder, v0.2.0
remember-file-positions, v0.1.5
save-session, vundefined
symbols-tree-view, v0.10.0
theme-switcher, v1.1.0
vim-mode-clipboard-plus, v0.1.0
vim-mode-plus, v0.1.1
zentabs, v0.8.6

# Dev
omnisharp-atom, v0.22.5
settings-view, v0.219.0

Undo/Redo should *never* leave text selected.

atom-vim-mode-plus does a better job than vim-mode at avoiding selection after an undo/redo. However, I found a critical bug in atom-vim-mode-plus where text is left highlighted after redo/undo.

Repro:

Use a JavaScript snippet (for, then tab).
Instead of typing in the placeholder of the snippet, press escape.
Then undo, then redo.
Now you'll see the text is highlighted!

This is very critical because if you undo/redo back to some long ago point in time where the text is selected, and then hit u, all of your forward history is lost because the u causes case change!

Thanks for looking into this.

TODO Priority

As many user start to use this package, its likely to be overwhelmed by feature or fix requests.
Its OK, but I want to prioritize to solve issue what I think its important.

At this point, here is the TODO I think very important and want to tackle to solve.

Remove imperative case-by-case selection/cursor position adjustment scattered in codes.

Most important and heavy task.
Currently selected area between visual-mode and operator's target is not consistent.
And doing imperative cursor position adjustment especially standing out in Motion::selectInclusive().
This kind of direct case-by-case adjustment introduce unwanted complexity and bug.

I want eliminate this kind of code completely for maintainability.
After this finished, some pending feature like #24 become easy to implement.

put cursor on correct position when doing undo/redo

#14

Add spec for basic feature

Some of new feature like visual-block mode still have no spec.

Refactor visual-block-mode to directly accept rectangle selection range

pass rectangle rows, column spec as argument and translate to actual selection by using selection.addSelectionRanges(ranges)

Write tutorial for new feature.

Some of new feature like surround, surround-any-pair, text-object function, comment make your editing very efficient.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Incremental search window doesn't dismiss on blur, shows on top of non-TextEditor items

  1. Open settings
  2. Open a text editor item
  3. Start searching with /
  4. Select settings tab and click inside it to lose focus on incremental search window
  5. Incremental search window remains
  6. Select text editor again
  7. Begin searching with /
  8. A second incremental search window appears, and the first is now broken

This issue also occurs if you invoke the command palette and then attempt to return to a search.

Atom Version: 1.0.11-278e988
System: Mac OS X 10.10.5
Thrown From: vim-mode-plus package, v0.1.0

Stack Trace

Uncaught TypeError: undefined is not a function

At /Users/tommunro/github/atom-vim-mode-plus/lib/vim-state.coffee:153

TypeError: undefined is not a function
  at OperationStack.module.exports.OperationStack.process (/Users/tommunro/github/atom-vim-mode-plus/lib/operation-stack.coffee:51:20)
  at /Users/tommunro/github/atom-vim-mode-plus/lib/operation-stack.coffee:32:8
  at OperationStack.module.exports.OperationStack.withLock (/Users/tommunro/github/atom-vim-mode-plus/lib/operation-stack.coffee:37:7)
  at OperationStack.module.exports.OperationStack.push (/Users/tommunro/github/atom-vim-mode-plus/lib/operation-stack.coffee:31:6)
  at atom-text-editor.commands.(anonymous function) (/Users/tommunro/github/atom-vim-mode-plus/lib/vim-state.coffee:150:29)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:184:20)

Commands

     -0:22.5.0 core:cancel (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:21.5.0 editor:consolidate-selections (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:21.5.0 core:cancel (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:20.5.0 editor:consolidate-selections (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:20.5.0 core:cancel (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:19.6.0 editor:consolidate-selections (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:19.6.0 core:cancel (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:19.2.0 editor:consolidate-selections (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:19.2.0 core:cancel (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:15.2.0 vim-mode:search (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:14.4.0 editor:consolidate-selections (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:14.4.0 core:cancel (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:09.2.0 vim-mode:search (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:08.4.0 pane:show-previous-item (atom-text-editor.editor.vim-mode-search.mini.is-focused)
     -0:05.2.0 pane:show-next-item (div.settings-view.pane-item)
     -0:04.3.0 vim-mode:search (atom-text-editor.editor.vim-mode.normal-mode.is-focused)

Config

{
  "core": {
    "destroyEmptyPanes": false,
    "themes": [
      "one-light-ui",
      "solarized-light-syntax"
    ],
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_STORE",
      "._*",
      "Thumbs.db",
      ".png",
      ".prefab",
      ".scene",
      ".meta"
    ],
    "packagesWithKeymapsDisabled": [
      "omnisharp-atom",
      "advanced-new-file",
      "recent-files-fuzzy-finder"
    ],
    "disabledPackages": [
      "vim-mode",
      "isearch"
    ]
  },
  "vim-mode-plus": {
    "enableHoverIndicator": true,
    "enableHoverIcon": true,
    "stayOnTransformString": true,
    "enableHoverSearchCounter": true,
    "enableIncrementalSearch": true,
    "useSmartcaseForSearch": true
  }
}

Installed Packages

# User
.bin, vundefined
atom-typescript, v6.0.17
atom-yeoman, v0.3.14
clipboard-plus, v0.5.1
cursor-history, v0.4.18
custom-search, v0.0.1
fuzzy-finder, v0.89.0
json-schema, v0.1.13
language-csharp, v0.10.0
linter, v1.6.0
linter-coffeelint, v1.1.0
omnisharp-atom, v0.23.0
recent-files-fuzzy-finder, v0.2.0
remember-file-positions, v0.1.5
save-session, vundefined
symbols-tree-view, v0.10.0
theme-switcher, v1.1.0
vim-mode-clipboard-plus, v0.1.0
vim-mode-plus, v0.1.0

# Dev
find-and-replace, v0.175.0
omnisharp-atom, v0.22.5
settings-view, v0.219.0

Can't move up while linewise visual mode

On wrapped lines, I can't move up by hitting k while linewise visual mode (shift-v).

In the GIF below, I'm trying to move up on line 12 and keeping pressing k !! ..but I can't.

Suggestion: Use "vim-mode" as editor class.

For compatibility with vim-mode and vim-mode-new with regard to user customised styles and keybinds.

Some users might find it useful to switch back and forward from vim-mode and vim-mode-plus to test features or if one becomes problematic due to a missing feature or a bug. Because they cannot run side by side for other reasons, I think reusing the class: vim-mode should grant that compatibility without any other problems?

I might be missing something that makes this a bad idea though.

FYI: The driver behind this is that I'm working on an atom plugin that adds many spacemacs style keybinds (spacemacs-evil-keys) for vim, and it needs to refer to the vim-mode class. When I switched to vim-mode-plus I had to redo all the keybinds.

Don't depend `onDidDispatch` observer

Currently to change mode from normal to visual-characterwise when some selection was made using mouse, it observe atom.commands.onDidDispatch event.
Detailed discussion is made on [atom/vim-mode#827].
Using this event is not only for mouse selection, but other reason seem to be minor for me.

I like old onDidChangeSelectionRange observation.
Current observing onDidDispatch event is too BIG for its original necessity.
And also I don't want to adjust cursor position if the cursor is putted on EOL by non vim-mode command.
This over poking might introduce strange/surprising behavior or bugs difficult to investigate.

Add support for paragraph commands `{` and `}`

Great project, much better than vim-mode. I didn't realize how essential { and } are to my workflow until I starting using atom. Not sure how long I will be using it but thought I would put this up here for whenever it could be worked on. If I keep using Atom, maybe I'll see about integrating it.

tab key in normal mode

Wondering if the tab key can be prevented from indenting text while in normal mode. I tried to map it as follows:

'atom-text-editor.vim-mode-plus.normal-mode':
  'tab': ''

but it didn't seem to have any effect.

Visual Mode does not support home/end

Although the plugin supports visual + 0/$ it does not support visual + home/end, which is differentiated behavior from true vim behavior. Suggest adding support for this.

Uncaught TypeError: this.activate is not a function

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.2.4
System: Ubuntu 14.04.3
Thrown From: vim-mode-plus package, v0.7.1

Stack Trace

Uncaught TypeError: this.activate is not a function

At /home/t/.atom/packages/vim-mode-plus/lib/main.coffee:53

TypeError: this.activate is not a function
    at vimStateCommands.reset-normal-mode (/home/t/.atom/packages/vim-mode-plus/lib/main.coffee:53:32)
    at atom-text-editor.<anonymous> (/home/t/.atom/packages/vim-mode-plus/lib/main.coffee:65:11)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29)
    at /opt/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.simulateBubblingOnDetachedTarget (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:558:23)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:535:14)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
    at KeymapManager.module.exports.KeymapManager.terminatePendingState (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:507:14)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:383:23)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/opt/atom/resources/app.asar/src/window-event-handler.js:99:36)
    at HTMLDocument.<anonymous> (/opt/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -3:57.9.0 blur (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.visual-mode.characterwise)
     -3:56.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  4x -3:56.6.0 blur (atom-text-editor.editor.mini.is-focused)
     -3:35.8.0 settings-view:open (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
  4x -3:35.6.0 blur (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
     -3:34.4.0 core:cancel (div.panels-item)
 29x -3:22.5.0 blur (div.panels-item)
     -0:08.8.0 vim-mode-plus:activate-normal-mode (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.visual-mode.characterwise)
     -0:08.6.0 vim-mode-plus:move-up (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
     -0:08.5.0 vim-mode-plus:move-down (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
  4x -0:07.9.0 vim-mode-plus:scroll-half-screen-down (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
 31x -0:04.9.0 vim-mode-plus:scroll-half-screen-up (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
  4x -0:03.0 vim-mode-plus:scroll-half-screen-down (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
     -0:00.7.0 core:close (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
  2x -0:00.7.0 blur (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)
     -0:00.7.0 vim-mode-plus:reset-normal-mode (atom-text-editor.editor.vim-mode.vim-mode-plus.is-focused.normal-mode)

Config

{
  "core": {},
  "vim-mode-plus": {
    "useSmartcaseForSearch": true,
    "incrementalSearch": true
  }
}

Installed Packages

# User
minimap, v4.17.0
project-manager, v2.6.5
vim-mode, v0.63.0
vim-mode-plus, v0.7.1

# Dev
No dev packages

Can't see cursor in visual mode

(Sorry for filing many issues at the same time. I'm still very new to Atom and a friend recommended this plugin, please redirect me to the correct place if I'm filing the wrong stuff! Thanks)

Selection using V makes the cursor disappear:
screenshot 2015-12-06 17 16 40
which makes jumping around with selection beginning/ending with o much more difficult. I guess it's placed too far to the right?

yy and p leaves extra blank line below

When using yy to copy one line and then typing p to paste that line, I'll always get two lines, one of which is an annoying blank line that i have to delete it manually...

Add migration guide

I want to try your plugin, but i have some overwrites in keymap and dont want read docs for converting it. If you add some list of commands and classes like "old -> new", more people will use it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.