GithubHelp home page GithubHelp logo

autoflow's Introduction

Atom

Build status

Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement

Atom is a hackable text editor for the 21st century, built on Electron, and based on everything we love about our favorite editors. We designed it to be deeply customizable, but still approachable using the default configuration.

Atom

Atom Screenshot

Visit atom.io to learn more or visit the Atom forum.

Follow @AtomEditor on Twitter for important announcements.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

Documentation

If you want to read about using Atom or developing packages in Atom, the Atom Flight Manual is free and available online. You can find the source to the manual in atom/flight-manual.atom.io.

The API reference for developing packages is also documented on Atom.io.

Installing

Prerequisites

macOS

Download the latest Atom release.

Atom will automatically update when a new release is available.

Windows

Download the latest Atom installer. AtomSetup.exe is 32-bit. For 64-bit systems, download AtomSetup-x64.exe.

Atom will automatically update when a new release is available.

You can also download atom-windows.zip (32-bit) or atom-x64-windows.zip (64-bit) from the releases page. The .zip version will not automatically update.

Using Chocolatey? Run cinst Atom to install the latest version of Atom.

Linux

Atom is only available for 64-bit Linux systems.

Configure your distribution's package manager to install and update Atom by following the Linux installation instructions in the Flight Manual. You will also find instructions on how to install Atom's official Linux packages without using a package repository, though you will not get automatic updates after installing Atom this way.

Archive extraction

An archive is available for people who don't want to install atom as root.

This version enables you to install multiple Atom versions in parallel. It has been built on Ubuntu 64-bit, but should be compatible with other Linux distributions.

  1. Install dependencies (on Ubuntu):
sudo apt install git libasound2 libcurl4 libgbm1 libgcrypt20 libgtk-3-0 libnotify4 libnss3 libglib2.0-bin xdg-utils libx11-xcb1 libxcb-dri3-0 libxss1 libxtst6 libxkbfile1
  1. Download atom-amd64.tar.gz from the Atom releases page.
  2. Run tar xf atom-amd64.tar.gz in the directory where you want to extract the Atom folder.
  3. Launch Atom using the installed atom command from the newly extracted directory.

The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases.

Building

Discussion

License

MIT

When using the Atom or other GitHub logos, be sure to follow the GitHub logo guidelines.

autoflow's People

Contributors

50wliu avatar benogle avatar damieng avatar daviwil avatar fornever avatar glv avatar idesi avatar jamesguthrie avatar joshaber avatar kevinsawicki avatar lee-dohm avatar maxbrunsfeld avatar mcolyer avatar mnquintana avatar peterdavehello avatar probablycorey-and-nathan avatar samestep avatar satchm0h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoflow's Issues

Autoreflow doesn't take non-breaking space into account

If there is a non-breaking space at a breaking point, autoreflow will break it and delete it.

Exemple:
Input:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmo tempor « incididunt ut labore »
                                                                                ^ 81st char and non-breaking space

After reflow:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmo tempor «
incididunt ut labore »

The non-breaking space has been broken!

Expected:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmo tempor
« incididunt ut labore »

The non-breaking space should not be broken

German Windows Keyboard

Nor sure for other OS, but in Windows / German keyboard layout AltGr + Q (equals "Strg + Alt + Q") is used to type the at-sign ("@"). So - as long as I don't change the setup of autoflow - each time I want to get an "@" the current file is destroyed.

("AltGr" is a known issue in Atom: atom/atom-keymap#35 )

Cursor moves to end of paragraph after reflow

After a reflow, the cursor moves to the very end of the paragraph. It would be more convenient (as well as match the reflow behavior of other editors, such as emacs and Sublime Text) if the relative position of the cursor did not change after a reflow.

Reflow Selection sometimes inserts an unnecessary space at the beginning of the first non-blank line

Atom 1.3.2 on OS X 10.10.5.

Repro:

  1. Type the following. Assume the second line is long enough that it will be reflowed. The pipes shouldn't be typed and simply indicate the beginning of the line.
| 
|This is a test.
| 
|This is a test.  This is a test.  This is a test.  This is a test.  This is a test.  This is a test.  This is a test.
  1. Select the typed text as well as the blank line above the first line.
  2. Perform Reflow Selection.

Expected:

| 
|This is a test.
| 
|This is a test.  This is a test.  This is a test.  This is a test.  This is a
|test.  This is a test.  This is a test.

Actual:

| 
| This is a test.
| 
|This is a test.  This is a test.  This is a test.  This is a test.  This is a
|test.  This is a test.  This is a test.

Notice that a space was added to the beginning of the first non-blank line for no reason.

This doesn't repro if you select the text and don't select the blank line before the first line.

Reflow jumbles separate lines together

This is following burodepeper/language-markdown#144. I searched briefly if the issue was already existing, sorry if it's a dupe.


To be clear, this happens when the heading and paragraph are not separated by an empty line.

Given I have markdown
  """
  ## Oh how headers are useful
  This is a paragraph with some text that will make it go over the line of 80 characters. It is a paragraph, and we want it to be separate from the heading.
  """
And I put the caret between "This" and "is"
When I invoke Reflow (Alt-Cmd-Q)
Then only the paragraph should be reflown

Actual:

## Oh how headers are useful This is a paragraph with some text that will make
## it go over the line of 80 characters. It is a paragraph, and we want it to be
## separate from the heading.

Latex comments broken on reflow selection

Hi,
I have not a gif but this issue is easily reproducible.

When I comment a long line with Latex (comment starts with %) and then run reflow selection, the comment is truncated (reflown) but only the first part is commented. The following new lines are not commented.

I tested only Latex but maybe this issue affects other languages as well.

Thanks

Collision with NPM autoflow package?

@holman tipped me off that the margin-stop package is not installing: https://github.com/atom/margin-stop/issues/2

[master] ~/.atom/packages/margin-stop $ apm install
Installing modules ✗

npm http GET https://registry.npmjs.org/autoflow/0.11.0
npm http GET https://registry.npmjs.org/temp
npm http 404 https://registry.npmjs.org/autoflow/0.11.0
npm ERR! Error: version not found: 0.11.0 : autoflow/0.11.0
npm ERR!     at RegClient.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/npm/node_modules/npm-registry-client/lib/request.js:275:14)
npm ERR!     at Request.self.callback (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/npm/node_modules/request/request.js:893:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/npm/node_modules/request/request.js:844:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:883:14
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

I suspect that this is because there's already an npm package named autoflow: https://npmjs.org/package/autoflow

Is it known/normal that apm searches npm first, then apm?

Markdown: Corner case with number and fullstop

Reflow should avoid the following situation in Markdown:

This is a sentence ending with the number 17. If it is broken before the number Markdown will interpret it as an enumeration.

=>
This is a sentence ending with the number
17. If it is broken before the number Markdown
will interpret it as an enumeration.

=> Equivalent to:
This is a sentence ending with the number

1. If it is broken 

Required solution: If the first token after the inserted break would be a number with an appended dot the line should be broken one token earlier.

Reflow selection breaks indentation

From @danbim on July 1, 2015 10:1

If I have a block of text indented and I use the "reflow selection" command (cmd+alt+q on Mac) the resulting text block will only keep the intended indentation in the first line but lose it in the following lines. While for some file types this might be the correct behaviour, IMO for many others it's not. Therefore "reflow selection" is unusable for my source code.

screen shot 2015-07-01 at 11 57 20

If the current behaviour is still to be supported I suggest to make this a customizable behaviour, e.g., depending on file type.

Copied from original issue: atom/atom#7621

Reflow breaks code in Lisp and Lisp-derived languages when reflowing comments

Lisp and Lisp-derived languages (Common Lisp, Scheme, Clojure, Emacs Lisp, etc.) use semicolons before single-line comments.

Before reflow:

;; Yadda yadda yada yada yada yada yada yada yada yada yada yada 
;; blah blah blah.

After reflow:

;; Yadda yadda yada yada yada yada yada yada yada yada
yada yada ;; blah blah blah.

Use wrap-guide's column length if it differs from editor's preferred line length

When the wrap-guide settings differ from the editor.preferredLineLength setting, it would be awesome if the autoflow package used the wrap-guide settings to determine the line length.

Example Use Case

For most files, I prefer a line length of 80 characters. So, I have editor.preferredLineLength set to 80.

But for Git commit messages, 72 characters is a better choice. To help me stick to that guideline, I have a custom wrap-guide setting for commit messages:

'wrap-guide':
  'columns': [
    {
      'pattern': 'COMMIT_EDITMSG'
      'column': 72
    }

I'd love to be able to reflow a commit message to 72 characters. Currently, when you reflow a paragraph, it uses editor.preferredLineLength to determine the line length.

The gif below demonstrates the current behavior. Note the wrap-guide at 72 characters, and the reflow wrap at 80 characters:

autoflow-demo

In my case, the commit message gets reflowed at 80 characters instead of 72. It would be awesome if it wrapped at 72 characters.


Note: I'm not sure whether we would want the autoflow package to have a dependency on the wrap-guide package. (Seems kinda weird.) Maybe these two packages should be combined?

"Auto-reflow" on editing

I think it might be useful to have an option to reflow paragraphs after every edit (typing, insertion, deletion, ...), so the user doesn't need to remember to reflow his buffer after writing.

Because this might not make sense for every kind of document, I think it would be reasonable to allow the user to select on which document kinds (identified by their grammar) this feature should be enabled.

reflow mail-messages with '>'

Hello,

I'm looking whether Atom could replace vim as external editor for composing messages in Claws/Evolution/etc. but the problem is that the message containing '>' chars is not properly reformatted due to '>' not being honored.

I asked about the same thing in the forum.

Do you believe there should me some special mail-mode for Atom or it could be handled within autoflow package itself?

Uncaught SyntaxError: Invalid regular expression

[Enter steps to reproduce below:]

  1. Start atom
  2. Type in /*** and then the character @ (note: which because of atom/atom-keymap#35 is actually executing Ctrl+Alt+Q which executes autoflow:reflow-selection)

This problem appears on my PC with Windows 7 64-bit, but this doesn't occur on my linux laptop. I have a german keyboard layout.

Atom Version: 0.199.0
System: lukas-PC
Thrown From: autoflow package, v0.23.0

Stack Trace

Uncaught SyntaxError: Invalid regular expression: /^/*** /: Nothing to repeat

At C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:42

SyntaxError: Invalid regular expression: /^/\*** /: Nothing to repeat
  at new RegExp (native)
  at C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:42:47
  at Object.module.exports.reflow (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:45:13)
  at Object.module.exports.reflowSelection (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:24:27)
  at atom-text-editor.atom.commands.add.autoflow:reflow-selection (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\autoflow\lib\autoflow.js:7:26)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\src\command-registry.js:238:29)
  at C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\src\command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:519:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:354:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (C:\Users\lukas\AppData\Local\atom\app-0.199.0\resources\app.asar\src\window-event-handler.js:178:20)

Commands

  4x -0:23.7.0 editor:newline (atom-text-editor.editor.is-focused)
  2x -0:23.2.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:17.3.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:15.5.0 autoflow:reflow-selection (atom-text-editor.editor.is-focused)
  2x -0:14.3.0 editor:delete-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:13.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:11.6.0 autoflow:reflow-selection (atom-text-editor.editor.is-focused)

Config

{}

Installed Packages

# User
language-powershell, v2.0.1

# Dev
No dev packages

Update documentation

The Readme contains only mac-shortcut, cmd-alt-q, but on other systems the default shortcut is ctrl-shift-q. Please update the Readme.

Clarify key mapping / add warning for fat-fingered Mac users

The README states the key-mapping as cmd-alt-q. I ignorantly/mistakenly used shift-option instead of option. It turns out that, on a mac, this nearby key-mapping happens to force quit all applications and immediately log the user out...

Could you add (or cmd-opt-q on Mac) to the README? (I did not use the command palette, which appears to use icons instead of 'alt' or 'opt'.)

Maybe also add a warning for those with fat fingers?

TextBuffer.change is deprecated.

Use TextBuffer::setTextInRange instead.

TextBuffer.change (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:846:12)
Object.reflowSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/autoflow/lib/autoflow.js:22:35)
HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/autoflow/lib/autoflow.js:10:26)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLInputElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
[object Object].each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
[object Object].trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
Package.module.exports.Package.handleActivationEvent (/Applications/Atom.app/Contents/Resources/app/src/package.js:555:23)
HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/package.js:3:61)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLInputElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
[object Object].each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
[object Object].trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
Ipc.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:32:50)
Ipc.emit (events.js:107:17)
process.<anonymous> (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:20:29)
process.emit (events.js:110:17)

Autoflow does not play well with comments

Code and comment before reflow:

/// `DiceResult` is a vector of unsigned integers.
///
/// `DiceResult` wraps a vector of unsigned integers, allowing us to implement specialized
/// formatting functions for dice roll results.
pub struct DiceResult(Vec<u32>);

Code and comment after reflow (did not select code for reflow operation; just including it for reference):

    /// `DiceResult` is a vector of unsigned integers.
     ///
     /// `DiceResult` wraps a vector of
/// unsigned integers, allowing us to implement specialized
     /// formatting functions for dice
/// roll results.
    pub struct DiceResult(Vec<u32>);

Entertainingly enough, this operation has actually inserted tabs in places. I, of course, have opted to use spaces instead of tabs in the settings menu.

Add support for .editorconfig file

Prerequisites

Description

EditorConfig is an attempt at standardizing certain configurations across text/code editors, to help keep things consistent, no matter who is editing the file or with what program. You can configure settings for a whole project, a directory, or specific files matched using globbing patterns, with rules set in standard INI format.

In particular, I think it would be helpful if Autoflow followed the max_line_length directive, which defines what should be the maximum number of characters per line. EditorConfig currently only uses the value here to set the placement of a visual text wrapping guide --- i.e., a hint, rather than forcing hard-wrap. However, I think "maximum line length" is semantically related enough that it would make sense for Autoflow to use this directive when determining how to rewrap text in the current context.

Versions

  • Fedora 25 Workstation x86_64
  • Atom 1.15.0
  • Autoflow 0.29.0
  • Electron 1.3.13
  • Chrome 52.0.2743.82
  • Node 6.5.0
  • apm 1.13.0
  • npm 3.10.10
  • node 6.9.5
  • python 2.7.13
  • git 2.9.3

Markdown lists are reflowed incorrectly

Like it says on the tin. When I try to reflow a markdown list item such as the following:

- Wow what a long item this is it'd be a good idea to wrap this to make things a little neater

I get this result

- Wow what a long item this is it'd be a good idea to wrap this to make things a
- little neater

Ideally it should look like this

- Wow what a long item this is it'd be a good idea to wrap this to make things a
  little neater

Reflow does not remove extra leading space when joining lines.

If your lines don't all have the same leading space, then the spaces before lines after the first one may not get trimmed before joining the lines.

As an example:

    <p>
      PinemeadowGolf.com pays you according to how much customers coming from your site buy
    from us. The more of your referrals who buy from us, the more you get paid. We pay a 10% commission
    for all product sales, so if 10 customers come to us from your site and they each buy $150 on golf
    products, you earn $150.00! It is that simple.
    </p>

becomes:

    <p>
      PinemeadowGolf.com pays you according to how much customers coming from
      your site buy     from us. The more of your referrals who buy from us, the
      more you get paid. We pay a 10% commission     for all product sales, so
      if 10 customers come to us from your site and they each buy $150 on golf
      products, you earn $150.00! It is that simple.
    </p>

reflowing JSdoc fails

###*
 * Constructor, options are passed in from the cli tool or manually when using nsync as a library.
 * By default, it just sets schema properties that all transports use.
 * @param {[type]} options [description]
 * @return {[type]} [description]
 * @extend
###

get's reflowed into this:

###*
 * Constructor, options are passed in from the cli tool or manually when using
 * nsync as a library. By default, it just sets schema properties that all
 * transports use. @param {[type]} options [description] @return {[type]}
 * [description] @extend
###

...which is pretty clearly wrong. It would be great if autoflow had the same behavior as ST2's wrap-plus package, which reflows to look like this:

###*
 * Constructor, options are passed in from the cli tool or manually when using
   nsync as a library.
 * By default, it just sets schema properties that all transports use.
 * @param {[type]} options [description]
 * @return {[type]} [description]
 * @extend
###

Horizontal scrolling after paragraph reformat

I have a long string of text on one line that is, let's say, 5000 characters long. I select it and choose Reformat Paragraph so that it now wraps to 120 characters wide. The editor requires me to manually scroll left until the wrapped text becomes visible. I think the new maximum editor width should be recalculated and scrolled automatically on reformat.

Reflow multiple paragraphs

It's not currently possible to reflow multiple paragraphs at once.

  • When multiple cursors are placed, only the paragraph containing the first cursor is reflowed.
  • When text is selected across multiple paragraphs, only the paragraph containing the beginning of the selection is reflowed.

I think in these cases the expected behaviour would be to reflow every paragraph that contains a cursor or is part of the selection.

Additionally, I think a separate command for reflowing the whole buffer would be useful.

Markdown: When paragraph starts with * it is (falsely) treated as a list

This is related to #4 but I'd say it's an issue of its own.

When a paragraph starts with a * * highlighting reflowing turns it into a list with arbitrary list items:

*Note:* This is a very long paragraph that starts with a highlighted word. But it is not a list

=>
*Note:* This is a very long paragraph that
*starts with a highlighted word. But
*it is not a list

However, this isn't even rendered as a list but as a paragraph with interspersed asterisks.

Suggestion: To be interpreted as a list there has to be whitespace after the leading asterisk.

key-binding vs hungarian keyboard

on hungarian keyboard some special characters are accessible through the key combination altGr-, which is the equivalent of Ctrl-Alt-. Autoreflow is mapped to Ctrl-Alt-q, which is the key combination required for the \ backslash chacter.

Sometimes reflow gives unexpected results

With some paragraphs:

Example paragraph hahahah akjfalk ahahahah lkakj lkjaoi lkajlkj
adflkjalfk lkajl kj lk  jj jajal ajajalkajofilajiel
ahahah

I get unexpected results:

Example paragraph hahahah akjfalk ahahahah lkakj lkjaoi lkajlkj
 adflkjalfk
lkajl kj lk  jj jajal ajajalkajofilajiel
 ahahah

After working on it, I think that lines which begin with a space mean that they can be joined with the previous line. So, the correct reflow for the example is:

Example paragraph hahahah akjfalk ahahahah lkakj lkjaoi lkajlkj adflkjalfk
lkajl kj lk  jj jajal ajajalkajofilajiel ahahah

This problem appears sometimes. I did not figure out why reflow sometimes works well, sometimes not. I am using autoflow 0.18.0, atom 0.136.0, on Ubuntu 14.04.

Thanks.

Cannot autoflow JSDoc comments

/**
 * Atom autoflow test. Cannot autoflow JSDoc comments.
 *
 * @readonly
 * @private
 */

this is autolowed into this :(

/**
 /** /** * Atom autoflow test. Cannot autoflow JSDoc comments. * * @readonly * /**
/**
 @private */

Atom v1.8.0
Mac OS X 10.11.5

Reflowing roxygen comments

Roxygen comments start with #' but when reflowed, this gets messed up:

#' this is a long roxygen comment. this is a long roxygen comment. this is a long roxygen comment. this is a
#' long roxygen comment.  this is a long roxygen comment. 

after reflow (incorrect):

#' this is a long roxygen comment. this is a long roxygen comment. this is a
#long roxygen comment. this is a ' long roxygen comment.  this is a long roxygen
#comment. 

[Windows] alt-ctrl-q -> autoflow:reflow-selection

In windows alt + ctrl + q or altgr + q should be native and create a @.
It runs autoflow:reflow-selection instead of beeing native!

Its not possible to create a @ at the moment. I had to disable the package.

Problem with German keyboards under Windows

On German keyboards under Windows, the default shortcut is the same that is used for the @ sign (AltGr-Q). This causes unwanted formatting and prevents usage of the @ sign, which is quite annoying.

`opt+cmd+q` not latex-sensitive

I’m new to Atom and am not sure if this issue belongs here, so let me know if it belongs somewhere else, e.g. in the issues for the package area/language-latex, which handles LaTeX language compatibility.

The issue #12 points out that Autoflow does not respect LaTeX comments, but really the problem is more broad. Here are a few misbehaviors of Autoflow in LaTeX. (Here I am defining the “correct” behavior as that of Sublime Text’s LaTeXTools package, which is what I’m used to.)

  1. Autoflow does not respect that lines beginning with a LaTeX command usually should not be reformatted.

    Input (the pipe represents where my cursor when I hit alt+cmd+q; no text is highlighted):

    \section{Introduction}
    |This is the
    introduction paragraph.
    

    Expected output:

    \section{Introduction}
    This is the introduction paragraph.
    

    Actual output:

    \section{Introduction} This is the introduction paragraph.
    

    I think the rule that Sublime’s LaTeXTools uses is that if a line begins with \ it is not reformatted.

  2. Autoflow does not fully respect LaTeX comments (I). This is pointed out in #12. Although comments are not treated as normal text like the \section command is in the first example, Autoflow does not correctly insert a symbol % upon reformatting.

    Input (the pipe represents where my cursor when I hit alt+cmd+q; no text is highlighted):

    \section{Introduction}
    |% In this section the subject is introduced. Lorem ipsum dolor sit amet, adipiscing elit.
    

    Expected output:

    \section{Introduction}
    % In this section the subject is introduced. Lorem ipsum dolor sit amet,
    % adipiscing elit.
    

    Actual output:

    \section{Introduction}
    % In this section the subject is introduced. Lorem ipsum dolor sit amet,
    adipiscing elit.
    
  3. Autoflow does not fully respect LaTeX comments (II). Similarly to above, Autoflow does not remove a % when it merges two comment lines.

    Input (the pipe represents where my cursor when I hit alt+cmd+q; no text is highlighted):

    \section{Introduction}
    |% In this section
    % the subject is introduced.
    

    Expected output:

    \section{Introduction}
    % In this section the subject is introduced.
    

    Actual output:

    \section{Introduction}
    % In this section % the subject is introduced.
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.