神刀安全网

Atom 1.9 Beta Brings Better Performance, Drag and Drop Tab Layout, and More

Version 1.9 beta0 of GitHub’s Atom text editor has been announced , along with Atom 1.8 . Atom 1.9 beta sports a completed redesign of its buffer display layers, drag and drop layout management for tabs, and an upgraded Electron.

According to GitHub engineer Antonio Scandurra, upgrading Electron – the framework on which Atom is built- to version 0.37.8 brought many rendering and performance improvements, including much faster cold startup time and a general increase in responsiveness. Additionally, Scandurra says, Atom “display layers” redesign makes editing and scrolling faster under given conditions, such as when soft-wrap is enabled or some text regions are folded. The new display layers design also enables free-form folds, which make it possible to fold an arbitrary selection of text, not just entire lines.

GitHub engineer Nathan Sobo explained that the new display layers feature, part of the text-buffer library, conveniently addresses the lack of correspondence between the raw content of a buffer and the way it should be rendered. This is, for example, due to hard tabs, soft line breaks, and leading whitespaces, which have a visual representation that does not exist in a file, and to folds, which imply that content present in the file should not be presented on screen. These concerns also intertwine with syntax highlighting and text decoration, which require more information than what available to the parser. To sum it all up, says Sobo, display layers provide a coherent API that allows developers to handle all of those concerns, e.g.:

let layer = buffer.addDisplayLayer({   tabLength: 1,   invisibles: {space: '•', cr: '¤', eol: '¬'},   softWrapColumn: 80,   foldCharacter: '⋯' })  // Fold arbitrary ranges layer.foldBufferRange([[1, 2], [3, 4]])  // Translate and clip points layer.translateScreenPosition([3, 4]) layer.clipScreenPosition([3, 4]) layer.translateBufferPosition([1, 2])  // Get transformed text layer.getText()  // Get line objects for a row range to render on screen. // These are represented in an "interesting" format for storage efficiency. layer.getScreenLines(0, 5) 

On the UI front, Atom 1.9 beta introduces the possibility of modifying the tab layout by dragging and dropping tabs around. When you drop a tab on top of another, this will create a vertical or horizontal split as shown in the image below.

Atom 1.9 Beta Brings Better Performance, Drag and Drop Tab Layout, and More

Atom 1.9 beta also brings more compatibility with Cygwin and Msys on Windows, and improves reliability when saving files by introducing a file recovery service .

Together with Atom 1.9 beta, GitHub also released GitHub 1.8 stable, which includes comparatively less noteworthy changes such as improved handling of environment variables , new commands to displace text left and right by one column, and more control on whether Atom tries to restore all the windows that were open when it was last closed.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Atom 1.9 Beta Brings Better Performance, Drag and Drop Tab Layout, and More

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址