Created
June 9, 2014 10:02
-
-
Save kurogelee/96bc04a2e1ed4cdcb4e6 to your computer and use it in GitHub Desktop.
Light Tableでカーソルをいろいろ移動する ref: http://qiita.com/kurogelee/items/ae59f18544f41d7461d2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns lt.plugins.cursorkit | |
(:require [lt.objs.command :as cmd] | |
[lt.objs.editor :as editor] | |
[lt.objs.editor.pool :as pool])) | |
(defn cm [] (editor/->cm-ed (pool/last-active))) | |
(cmd/command {:command ::extend-true | |
:desc "cursorkit: Set Extending true" | |
:exec (fn [] (.setExtending (cm) true))}) | |
(cmd/command {:command ::extend-false | |
:desc "cursorkit: Set Extending false" | |
:exec (fn [] (.setExtending (cm) false))}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.execCommand cm "goLineEnd") | |
(.execCommand cm "goLineStart") | |
(.execCommand cm "goLineStartSmart") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.execCommand cm "goLineLeft") | |
(.execCommand cm "goLineRight") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.execCommand cm "goLineUp") | |
(.execCommand cm "goLineDown") | |
(.execCommand cm "goCharLeft") | |
(.execCommand cm "goCharRight") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.execCommand cm "goColumnLeft") | |
(.execCommand cm "goColumnRight") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(do | |
(.execCommand cm "goLineStartSmart") | |
(.setExtending cm true) | |
(.execCommand cm "goLineEnd") | |
(.setExtending cm false)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns sample.core | |
(:require [lt.objs.editor :as editor] | |
[lt.objs.editor.pool :as pool])) | |
(def cm (editor/->cm-ed (pool/last-active))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment