Skip to content

Instantly share code, notes, and snippets.

@t9md
t9md / keymap.cson
Created April 11, 2018 14:49
recover original ctrl-c on win when using with vim-mode-plus.
'atom-text-editor':
'ctrl-c': 'core:copy'
@t9md
t9md / bookmarks.js
Created February 24, 2018 17:35
narrow-bookmarks provider
const {Range} = require('atom')
const Provider = require('./provider')
const {compareByPoint} = require('../utils')
const Config = {
showProjectHeader: true,
showFileHeader: true
}
// HACK: Core bookmarks package

To mafke tab confirm 2nd complete candidates.

  • init.js
atom.commands.add("atom-text-editor", "user:autocomplete-plus-select-next-and-confirm", function() {
  const editor = this.getModel()
  atom.commands.dispatch(editor.element, "core:move-down")
 atom.commands.dispatch(editor.element, "autocomplete-plus:confirm")
renderItems () {
if (this.items.length > 0) {
const className = ['list-group'].concat(this.props.itemsClassList || []).join(' ')
if (this.observer) {
etch.getScheduler().getNextUpdatePromise().then(() => {
const elements = Array.from(this.refs.items.children)
// Use initially rendered last item's height as height of all fake item
// Refering 1st item is bad idea, since 1st item tend to be rendered differently.
atomic-chrome: 0.3.0
choose-pane: 0.8.0
clip-history: 0.4.0
cursor-history: 0.12.0
demo-mode: 0.4.1
dev: 0.0.0
duotone-dark-sea-syntax: 2.1.0
markdown-toc-auto: 0.8.0
mprettier: 0.1.2
narrow: 0.53.2
@t9md
t9md / config.cson
Created November 24, 2017 04:18
submode perfect gt
submode:
submode:
"gt-mode":
target: "atom-pane"
commands: [
"pane:show-next-item"
"pane:show-previous-item"
]

I'm t9md

t9md__t9md_.png Presentation1.png

  • My editor history: Vim > Emacs > Vim > Atom
class setCursorAtStart extends Operator
@extend()
restorePositions: false
mutateSelection: (selection) ->
selection.cursor.setBufferPosition(@getPointForSelection(selection))
getPointForSelection: (selection) ->
@t9md
t9md / keymap.cson
Created September 6, 2017 04:17
keymapcson
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
'g ^': 'vim-mode-plus:move-to-first-character-of-screen-line'
getVisibleEditors = ->
(editor for pane in atom.workspace.getPanes() when editor = pane.getActiveEditor())
# because of let of `eol`
translatePointAndClip = (editor, point, direction) ->
point = Point.fromObject(point)
dontClip = false
switch direction
when 'forward'