This file contains 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
// From | |
nvim.tabpage.then(tabpage => tabpage.window).then(window => window.buffer).then(buffer => buffer.lines).then(lines => lines); | |
// To | |
const lines = await nvim.tabpage.window.buffer.lines; | |
// or without await | |
nvim.tabpage.window.buffer.lines.then(lines => lines); |
This file contains 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
nvim.getBuffer().getLines().then(lines => lines); |
This file contains 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
const lines = await nvim.buffer.lines; |
This file contains 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
const buffer = await nvim.buffer; | |
const lines = await buffer.lines; |
This file contains 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
const buffer = await nvim.getBuffer(); | |
const lines = await buffer.getLines(); |
This file contains 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
class Buffer { | |
getLines() { | |
return new Promise((resolve) => resolve(['exciting', 'lines'])); | |
} | |
} | |
class Neovim { | |
getBuffer() { | |
return new Promise((resolve) => resolve(new Buffer())); | |
} |
This file contains 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
// Desired API | |
const name = await neovim.buffer.name; // neovim.buffer.name((name) => name); | |
class Buffer { | |
get name() {} | |
remove(start, end) {} | |
} | |
class Neovim { | |
get buffer() { |
This file contains 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
Process: 2.28-x64-chromedriver [17759] | |
Path: /Users/USER/*/2.28-x64-chromedriver | |
Identifier: 2.28-x64-chromedriver | |
Version: 0 | |
Code Type: X86-64 (Native) | |
Parent Process: java [17757] | |
Responsible: 2.28-x64-chromedriver [17759] | |
User ID: 501 | |
Date/Time: 2017-04-28 12:18:50.389 -0700 |
This file contains 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
class MainView extends React.Component { | |
_addEntry(e) { | |
this.props.navigator.push({ | |
title: 'New', | |
component: AddEntryView, | |
rightButtonTitle: 'Save', | |
onRightButtonPress: (e) => { | |
// save | |
}, | |
}); |
This file contains 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
module.exports = function(grunt) { | |
// easy way to load grunt tasks in package.json | |
// require('load-grunt-tasks')(grunt); | |
// or the normal way | |
grunt.task.loadNpmTasks('grunt-concurrent'); | |
grunt.task.loadNpmTasks('grunt-contrib-connect'); | |
grunt.task.loadNpmTasks('grunt-contrib-watch'); | |
// configure local dev server | |
grunt.config('connect.dev', { |
NewerOlder