-
Notifications
You must be signed in to change notification settings - Fork 112
VimConf2016Presentation
- This is a my presentation slide on VimConf 2016 held in Japan at 2016.11.05.
- You can see same presentation in slide format via qiita.
- If you understand Japanese language, presentation recording is on youtube.
- One of the presenter and great pure Vim plugin creator @haya14busa wrote a report on medium.
- Was normal Vim user
- Was advanced Emacs user.
- Was advanced Vim user
- vim-chef, vim-xmpfilter, textmanip, choosewin, quickhl, smalls...
- Am Atom with vim-mode-plus user
- vim-mode-plus, cursor-history, open-this, quick-highlight, project-folder...
What makes me editor addict 💉 is difficulties and limitless enhanceability of Emacs.
What is the vim-mode-plus?
Started by forking vim-mode maintained by GitHub
- Forked at 2015.08
- Public release at 2015.09.28
- Now 104 releases(!!) from initial release at 2016.11.04(about 1 release/4 days)
- Now de facto vim keybinding in Atom?
vim-mode's README was updated yesterday(2016.11.04)
Current Status - DEPRECATED in favor of vim-mode-plus
- It's honor to be used by really talented programmers(jordwalke, chenglou, rtfeldman).
- Happy to be mentioned in JavaScriptAir 034
- 🎨 Refactoring
- Rewrote every lines of codes. Greatly reduced complexity.
- 🎁 Add lot's of new features:
- incremental-search
- visual-block-mode
- surround
- any-pair text-object
- occurrence operator-modifier
- persistent-selection
- 🙇 Off course, thanks to great vim-mode
- Sincerely, I feel I couldn't do anything without original vim-mode.
- Gifs
High speed tour from beginner to expert in 7 steps
[Vim/vim-mode-plus for Atom] 秒速で初心者からエキスパートになる。 たった7ステップで。
The editing is transforming state of text by mutation.
initial-text -> mutate -> final-text
Mutating text with operator and target by telling vim to "do what on which target".
- Subject is You.
- Verb: is Operator
- Specify what to do. The verb requires an object(=target).
- Do mutation(Delete ✂️, Yank 📋, CamelCase 🐫)
- Objects: is Target(Motion or TextObject)
- Specify where, which to apply an operators on.
-
i w
(inner-word
text-object),j
(from-here-to-next-line
)
class DeleteToLastCharacterOfLine extends Delete
@extend()
target: 'MoveToLastCharacterOfLine'
execute: ->
if @isMode('visual', 'blockwise')
swrap.setReversedState(@editor, false)
super
top = @peekTop()
if top.isComplete()
@execute(@stack.pop())
else
if @mode is 'normal' and top.isOperator()
@modeManager.activate('operator-pending')
# Temporary set while command is running
if commandName = top.constructor.getCommandNameWithoutPrefix?()
@addToClassList(commandName + "-pending")
- Maximize current pane
- Incremental search
-
flashOnOperate
andflashOnUndoRedo
✨ - StayOn family(
stayOnTransformString
,stayOnYank
,stayOnDelete
) ✨ - Motions:
MoveDownToEdge
,MoveToNextNumber
,MoveToNextString
- TextObject:
AnyPair
,Indentation
,Entire
(All),Fold
,Function
,Comment
- Operator: Lots of string transformer(
Sort
,CamelCase
,SnakeCase
,Surround
,ToggleLineComments
,ReplaceWithRegister
etc..) - Operator: Meta string transformer (
TransformStringBySelectList
). - Narrowed selection.
cmd-d
(select-occurrence
),ctrl-cmd-c
(change-occurrence
). - Super granular keymap scopes(e.g. mapping only effective when
toggle-line-comments-pending
) - Persistent-selection: works as like normal visual-selection but you can make selection persist.
- Side-effect-less operator by
stayOnYank
,stayOnDelete
andstayOnTransformString
- In pure-Vim,
y i p
move cursor to start of yanked area. - I want cursor move only when I said so. Don't move unless I said so 🔫.
- But cursor movement convinces user the success of an operator.
- Just dont-move-cursor is not enough,
flashOnOperate
🔦 compliment user's confidence.
- As like you can force-wise of operator by
d v j
,o
modifies operator's behavior to works on occurrences within target. - A preset-occurrence allows you to set occurrence preliminarily.
-
ctrl-o
inincremntal-search
allows you to set preset-occurrence by regex pattern- e.g.
/ ^ # * $ ctrl-o g U i e
uppercases all lines starts with#
.
- e.g.
- Also a persistent-selection allows you to pre-specify a target of operator.
Sometimes, replacing single-char in bulk is faster 💨 than repeating operator.
-
🚨
⚠️ vim-mode-plus is not trying to be complete-Vim- Impossible and no motivation for that.
- Atom is NOT Vim.
-
🚀 vim-mode-plus is aggressively evaluating how effective-editing-would-be.
- How is it like when xxx is yyy.
- Is zzz feature is really practically(not conceptually) useful?
-
💭 🗿 💤 Thinking about Vim deeply further than I was pure-Vim user.
- And always found pure-Vim's really careful and maniac decision for developer's intuitiveness/productivities.