Giter Site home page Giter Site logo

markdown-scroll-sync's Introduction

markdown-scroll-sync Atom editor package

Auto-scroll markdown-preview tab to match markdown source.


mkdn-scrl-sync

Note about version 2.x.x

This is a total rewrite of the package. This version is more accurate and smoother. And last, but not least, fewer bugs (grin).

Installation

Run apm install markdown-scroll-sync or use the settings page to find the package and install it.

Usage

There is no atom command or keybinding. There are no config settings. Just open a markdown file, open the preview, and watch it work.

License

Copyright Mark Hahn by MIT license.

markdown-scroll-sync's People

Contributors

biffster avatar chaserhkj avatar chengxudaixie avatar johnchristopherjones avatar kevgathuku avatar mark-hahn avatar michaelforrest avatar ojford 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  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  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

markdown-scroll-sync's Issues

Uncaught Error: Cannot find module 'underscore'

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.7
System: Mac OS X 10.10.1
Thrown From: markdown-scroll-sync package, v0.4.0

Stack Trace

Uncaught Error: Cannot find module 'underscore'

At module.js:330

Error: Cannot find module 'underscore'
    at Module._resolveFilename (module.js:328:15)
    at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:270:25)
    at Module.require (module.js:357:17)
    at require (module.js:376:17)
    at Object.<anonymous> (/Users/chenliu/.atom/packages/markdown-scroll-sync/node_modules/roaster/lib/roaster.js:8:7)
    at Object.<anonymous> (/Users/chenliu/.atom/packages/markdown-scroll-sync/node_modules/roaster/lib/roaster.js:73:4)
    at Module._compile (module.js:452:26)
    at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:163:21)
    at Module.load (module.js:347:32)

Commands

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
markdown-scroll-sync, v0.4.0
vim-mode, v0.58.0
vim-surround, v0.8.0

# Dev
No dev packages

Preview keeps scrolling to top when typing

Thank you for making this plugin! However I found this little glitch where preview window keeps scrolling back to top when typing source code, and when I scroll on source code, preview window works as expected.

Failed to activate the markdown-scroll-sync package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.4.1
System: Mac OS X 10.11.3
Thrown From: markdown-scroll-sync package, v2.0.3

Stack Trace

Failed to activate the markdown-scroll-sync package



Error: ENOENT: no such file or directory, lstat '/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou'
    at Error (native)
    at fs.lstatSync (fs.js:844:18)
    at Object.fs.lstatSync (ATOM_SHELL_ASAR.js:189:16)
    at realpathSync (fs.js:1454:21)
    at Object.fs.realpathSync (ATOM_SHELL_ASAR.js:272:24)
    at toRealPath (module.js:109:13)
    at Function.Module._findPath (module.js:149:20)
    at Module._resolveFilename (module.js:334:25)
    at Function.Module._resolveFilename (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/node_modules/cheerio/node_modules/htmlparser2/lib/Tokenizer.js:3:23)
    at Module._compile (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/node_modules/cheerio/node_modules/htmlparser2/lib/Parser.js:1:96)
    at Module._compile (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/node_modules/cheerio/node_modules/htmlparser2/lib/index.js:1:93)
    at Module._compile (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Users/name/Library/Application Support/com.github.atom.ShipIt/update.jdiT4ou/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)

Commands

Config

{
  "core": {
    "packagesWithKeymapsDisabled": [
      "insert-timestamp"
    ]
  }
}

Installed Packages

# User
No installed packages

# Dev
No dev packages

Bidirectional Sync

The current behavior allows for source-to-preview sync. It could also work the other way around, as synctex in latex.

markdown-scroll-sync did not work without .md extension.

I'm using markdown preview with .Rmd extension or even with .txt extension.
However, markdown-scroll-sync didn't work on markdown preview if the file extension is not .md.
Is it possible to be recognized .Rmd file to markdown-scroll-sync to sync scrolling?
thanks!
K

Uncaught Error: This TextEditor has been destroyed (README closed before preview)

  1. README.md file is open along with markdown-preview tab
  2. If the README.md file is closed BEFORE the preview, this error is thrown

Atom Version: 0.182.0
System: Microsoft Windows 7 Enterprise
Thrown From: markdown-scroll-sync package, v0.3.0

Stack Trace

Uncaught Error: This TextEditor has been destroyed

At C:\Users\amarinelli\AppData\Local\atom\app-0.182.0\resources\app\src\display-buffer.js:1005

Error: This TextEditor has been destroyed
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (C:\Users\amarinelli\AppData\Local\atom\app-0.182.0\resources\app\src\display-buffer.js:1005:15)
  at TextEditor.module.exports.TextEditor.screenPositionForBufferPosition (C:\Users\amarinelli\AppData\Local\atom\app-0.182.0\resources\app\src\text-editor.js:1228:33)
  at C:\Users\amarinelli\.atom\packages\markdown-scroll-sync\lib\main.coffee:53:23

Commands

     -6:31.2 core:confirm (atom-text-editor.editor.mini)
  2x -2:52.2 markdown-preview:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  }
}

Installed Packages

# User
markdown-scroll-sync, v0.3.0
minimap, v4.3.1
tidy-markdown, v0.1.0

# Dev
No dev packages

Request to have this package removed

As has been said by the author of this tweak himself, this package is deprecated and he is no longer supporting it. Considering that this package, at least in my experience (tried on multiple machines and over many version of atom), works tentatively at best, with a jerky and inaccurate sync, and at the worst just doesn't work at all or repeatedly crashes, I am formally requesting that this package be taken down or marked as deprecated so that development can recommence by someone else.

The lack of scroll sync and decent markdown editing, like you have Macdown for example, is a real killer for me being able to tolerate atom and I'm sure I'm not alone. This is especially concerning considering that github has made such a push to have markdown become a standard, and is quite incredible that it has even had to fall to individuals such as Mark to implement features such as this themselves instead of just being created by the core dev team.

Any input on this suggestion would be welcome because I want to get the ball rolling again on making atom a great editor.

Preview scroll breaks on fenced comments

Scroll syncing breaks when fenced code blocks are used with inline comments. For example, pasting this about midway into test.md breaks scroll sync.

```javascript
// js
myModule.controller('MainCtrl', function() {
  this.title = 'Hello, World.';
});
```

This appears to be caused in startTracking: by a selector that selects .line and later expects all the matching elements to have a data-screen-row attribute. However, the inline // js comment above is nested within a <span class="line"> element.

This could be fixed by changing the selector. Changing the selector to div.line or div[data-screen-row] appears to do the trick.

Uncaught Error: Cannot find module 'roaster'

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.187.0
System: linux 3.16.0-34-generic
Thrown From: markdown-scroll-sync package, v0.3.2

Stack Trace

Uncaught Error: Cannot find module 'roaster'

At module.js:353

Error: Cannot find module 'roaster'
  at Module._resolveFilename (module.js:351:15)
  at Function.Module._resolveFilename (/usr/share/atom/resources/app/src/module-cache.js:383:52)
  at Function.Module._load (module.js:293:25)
  at Module.require (module.js:380:17)
  at require (module.js:399:17)
  at /home/huglester/.atom/packages/markdown-scroll-sync/lib/main.coffee:13:22
  at process._tickCallback (node.js:366:11)

Commands

Config

{}

Installed Packages

# User
linter, v0.12.0
linter-php, v0.0.12
linter-phpcs, v0.0.12
linter-phpmd, v0.0.10
markdown-scroll-sync, v0.3.2

# Dev
No dev packages

Scroll Sync does not work

I am on a mac and using the following packages in atom

  1. markdown-scroll-syn (mark-hahn)
  2. markdown-helpers (catacgc)
  3. markdown-lists (brunobord)
  4. markdown-pdf (travs)
  5. markdown-preview-katex (abejfehr)

After opening the preview pane and scrolling the source file, the preview pane does not scroll automatically.

Is the tool out of date or is it conflicting with Katex preview tool?

Conflict with markdown-toc > Uncaught TypeError: _this.resultNode.scrollIntoView is not a function

I found that markdown-scroll-sync throws an uncaught error if the first thing in the file is a toc that is generated by markdown-toc like:

<!-- TOC depth:6 withLinks:1 updateOnSave:1 orderedList:0 -->

- [workaround](#workaround)
- [Socket programming](#socket-programming)
    - [socketeering](#socketeering)
    - [linux](#linux)
<!-- /TOC -->

I found that I could work around that if I put my TOC below a heading

my toc

    <!-- TOC 

[Enter steps to reproduce below:]

  1. Install markdown-toc (0.3.0 at time of writing).
  2. Insert toc (search for command, insert toc)
  3. Fill multiple pages so that one has to scroll
  4. Scroll down on markdown file.
  5. Scroll up
  6. When reaching the toc section, this error occurs.

Atom Version: 1.0.16
System: Mac OS X 10.10.4
Thrown From: markdown-scroll-sync package, v0.4.2

Stack Trace

Uncaught TypeError: _this.resultNode.scrollIntoView is not a function

At /Users/lufimtse/.atom/packages/markdown-scroll-sync/lib/main.coffee:116

TypeError: _this.resultNode.scrollIntoView is not a function
  at /Users/lufimtse/.atom/packages/markdown-scroll-sync/lib/main.coffee:116:21
  at MarkdownScrlSync.module.exports [as roaster] (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/roaster/lib/roaster.js:69:14)
  at MarkdownScrlSync.scroll (/Users/lufimtse/.atom/packages/markdown-scroll-sync/lib/main.coffee:104:6)
  at /Users/lufimtse/.atom/packages/markdown-scroll-sync/lib/main.coffee:81:10

Commands

 10x -1:36.1.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)
  4x -1:21.3.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -1:18.7.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)
  2x -1:16.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:10.3.0 find-and-replace:select-all (atom-text-editor.editor.is-focused)
     -0:53.7.0 fuzzy-grep:toggle (atom-text-editor.editor.is-focused)
     -0:49 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:49 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:48.6.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:45.7.0 fuzzy-grep:toggle (atom-text-editor.editor.is-focused)
 10x -0:40.7.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:15.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:13.4.0 markdown-preview:toggle (atom-text-editor.editor.is-focused)
 17x -0:07.8.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)
     -0:04.8.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
  3x -0:04.5.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "markdown-folder"
    ]
  }
}

Installed Packages

# User
atom-fuzzy-grep, v0.6.0
markdown-mindmap, v0.2.4
markdown-scroll-sync, v0.4.2
markdown-toc, v0.3.0
markdown-writer, v2.0.0
minimap, v4.13.4
minimap-codeglance, v0.4.2

# Dev
No dev packages

Uncaught TypeError: Cannot read property 'split' of undefined

[Enter steps to reproduce below:]

  1. Open Atom
  2. Create new file

Atom Version: 1.4.3
System: Mac OS X 10.11.3
Thrown From: markdown-scroll-sync package, v2.1.1

Stack Trace

Uncaught TypeError: Cannot read property 'split' of undefined

At /Users/edwardarubin/.atom/packages/markdown-scroll-sync/lib/main.coffee:29

TypeError: Cannot read property 'split' of undefined
    at isMarkdown (/Users/edwardarubin/.atom/packages/markdown-scroll-sync/lib/main.coffee:29:46)
    at /Users/edwardarubin/.atom/packages/markdown-scroll-sync/lib/main.coffee:33:10
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:333:27
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at Pane.module.exports.Pane.setActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:248:22)
    at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:316:21)
    at Pane.module.exports.Pane.activateItemAtIndex (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:310:19)
    at Pane.module.exports.Pane.activateNextItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:267:21)
    at Pane.module.exports.Pane.removeItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:389:16)
    at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:453:16)
    at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:433:12)
    at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:656:35)
    at Workspace.module.exports.Workspace.closeActivePaneItemOrEmptyPaneOrWindow (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:695:21)
    at atom-workspace.commandRegistry.add.core:close (/Applications/Atom.app/Contents/Resources/app.asar/src/register-default-commands.js:170:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

  2x -0:07.7.0 application:new-file (atom-pane.pane.active)
  3x -0:02.6.0 core:close (atom-pane.pane.active)

Config

{
  "core": {
    "disabledPackages": [
      "language-markdown",
      "markdown-preview",
      "block-cursor",
      "terminal-plus",
      "antialiased",
      "omni-ruler"
    ],
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ],
    "openEmptyEditorOnStart": false,
    "packagesWithKeymapsDisabled": [
      "mathjax-wrapper"
    ],
    "themes": [
      "native-ui",
      "proton-kai"
    ]
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.5.1
atom-clock, v0.0.6
autocomplete-python, v1.6.1
color-picker, v2.1.1
cursor-blink-interval, v0.3.1
cursor-indicator, v1.2.7
file-icons, v1.6.14
highlight-selected, v0.11.2
ink, v0.3.2
language-julia, v0.5.0
language-latex, v0.6.1
language-r, v0.4.0
language-stata, v0.1.0
latex, v0.29.0
latextools, v0.7.6
markdown-preview-plus, v2.2.2
markdown-scroll-sync, v2.1.1
minimap, v4.19.0
minimap-cursorline, v0.1.0
native-ui, v0.17.0
pdf-view, v0.39.0
pigments, v0.23.1
proton-kai, v0.1.0
wordcount, v2.6.0

# Dev
No dev packages

Does not sync when Markdown preview is scrolled

IMO this package should sync in both ways. Currently it only syncs when I scroll, the source markdown code.
However I would like if it also syncs the source code when I scroll in the preview.

syncissues

markdown-scroll-sync auto-hides tab-bar?

Hi,

this nifty plug-in unfortunately seems to be responsible for the tab-bar being automatically hidden whenever a markdown-preview tab is opened. Have to press ctrl-alt-p once to show it again.

Atom 1.0 on Win7

Installed Packages

# User
altgr, v0.1.0
autocomplete-php, v0.3.6
color-picker, v2.0.7
compare-files, v0.6.1
copy-config-info, v0.4.0
docblockr, v0.7.2
emmet-simplified, v2.4.2
file-icons, v1.5.8
indentation-indicator, v0.6.0
language-batch, v0.3.3
linter, v1.1.0
linter-php, v0.0.15
markdown-scroll-sync, v0.4.0
minimap-bookmarks, v0.1.0
minimap-linter, v1.0.0
minimap-selection, v4.3.0
monokai-syntax-for-one-dark, v0.2.2
open-recent, v2.2.4
useful-context-menu, v0.2.1

No Errors are thrown or displayed in the console. Any help is appreciated. If you need more debug information, let me know what exactly you need and how to get it (i'm new to atom).

If this is intended (but not documented...) behaviour, please let me know :)

Thanks!

Uncaught TypeError: Cannot read property 'querySelectorAll' of null

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.2.4
System: Mac OS X 10.11.1
Thrown From: markdown-scroll-sync package, v2.0.3

Stack Trace

Uncaught TypeError: Cannot read property 'querySelectorAll' of null

At /Users/kevinSuttle/.atom/packages/markdown-scroll-sync/lib/utils.coffee:12

TypeError: Cannot read property 'querySelectorAll' of null
    at MarkdownScrlSync.module.exports.getVisTopHgtBot (/Users/kevinSuttle/.atom/packages/markdown-scroll-sync/lib/utils.coffee:12:38)
    at MarkdownScrlSync.module.exports.setMap (/Users/kevinSuttle/.atom/packages/markdown-scroll-sync/lib/map.coffee:15:8)
    at MarkdownScrlSync.startTracking (/Users/kevinSuttle/.atom/packages/markdown-scroll-sync/lib/main.coffee:49:6)
    at /Users/kevinSuttle/.atom/packages/markdown-scroll-sync/lib/main.coffee:37:14
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:333:27
    at Pane.module.exports.Pane.observeActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:196:7)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:331:42
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
    at PaneContainer.module.exports.PaneContainer.setActivePane (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:196:22)
    at Pane.module.exports.Pane.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:619:15)
    at Pane.module.exports.Pane.focus (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:207:21)
    at atom-pane.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-element.js:50:23)

Commands

     -1:15.9.0 core:backspace (input.hidden-input)
     -1:15.1.0 core:save (input.hidden-input)
     -1:09.2.0 command-palette:toggle (input.hidden-input)
     -1:06.2.0 core:confirm (input.hidden-input)
     -1:06.2.0 markdown-preview:toggle (input.hidden-input)
     -0:50.1.0 core:move-left (input.hidden-input)
     -0:48.9.0 editor:move-to-end-of-word (input.hidden-input)
     -0:48.5.0 core:move-left (input.hidden-input)
     -0:48.1.0 core:backspace (input.hidden-input)
  2x -0:47.8.0 editor:move-to-end-of-word (input.hidden-input)
     -0:45.8.0 core:move-left (input.hidden-input)
     -0:38.5.0 core:backspace (input.hidden-input)
     -0:34 core:save (input.hidden-input)
     -0:01.6.0 core:move-left (input.hidden-input)
  2x -0:01.2.0 editor:select-to-beginning-of-word (input.hidden-input)
     -0:00.1.0 core:select-right (input.hidden-input)

Config

{
  "core": {
    "projectHome": "~/Code/",
    "disabledPackages": [
      "language-javascript-jsx",
      "autohide-tree-view",
      "tool-bar",
      "tool-bar-main"
    ]
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.3.0
atom-beautify, v0.28.19
atom-html-preview, v0.1.13
editorconfig, v1.2.2
file-icons, v1.6.13
highlight-line, v0.11.0
highlight-selected, v0.11.1
language-babel, v2.5.3
language-docker, v1.1.3
language-dots, v0.0.4
language-graphql, v0.2.0
language-haskell, v1.5.1
language-rust, v0.4.5
linter, v1.11.3
linter-csslint, v1.1.0
linter-eslint, v5.2.4
linter-jsonlint, v1.1.0
markdown-scroll-sync, v2.0.3
markdown-writer, v2.0.1
pigments, v0.19.1
pretty-json, v0.4.1
react, v0.12.10
set-syntax, v0.3.0
sync-settings, v0.6.0
tabs-to-spaces, v1.0.1
trailing-spaces, v0.3.2

# Dev
No dev packages

Uncaught TypeError: Cannot read property 'querySelector' of null

  1. Open markdown file
  2. Toggle preview mode, plugin crashes

Atom Version: 0.186.0
System: Mac OS X 10.10.2
Thrown From: markdown-scroll-sync package, v0.1.0

Stack Trace

Uncaught TypeError: Cannot read property 'querySelector' of null

At /Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:128

TypeError: Cannot read property 'querySelector' of null
  at MarkdownScrlSync.startTracking (/Users/cw/.atom/packages/markdown-scroll-sync/lib/main.coffee:39:37)
  at /Users/cw/.atom/packages/markdown-scroll-sync/lib/main.coffee:33:16
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Atom.app/Contents/Resources/app/src/pane-container.js:347:34
  at Pane.module.exports.Pane.observeActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:174:7)
  at /Applications/Atom.app/Contents/Resources/app/src/pane-container.js:346:42
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at PaneContainer.module.exports.PaneContainer.setActivePane (/Applications/Atom.app/Contents/Resources/app/src/pane-container.js:218:22)
  at Pane.module.exports.Pane.activate (/Applications/Atom.app/Contents/Resources/app/src/pane.js:638:15)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/markdown-preview/lib/main.js:154:37
  at _fulfilled (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:794:54)
  at self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:823:30)
  at Promise.promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:756:13)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:516:49
  at flush (/Applications/Atom.app/Contents/Resources/app/node_modules/q/q.js:110:17)
  at process._tickCallback (node.js:364:11)

Commands

     -3:14.2 core:save (input.hidden-input)
     -2:54.2 core:undo (input.hidden-input)
     -2:45.6 core:save (input.hidden-input)
     -2:10.0 vim-mode:activate-insert-mode (input.hidden-input)
  4x -2:08.7 core:backspace (input.hidden-input)
  2x -2:06.8 core:undo (input.hidden-input)
  2x -1:39.3 core:save (input.hidden-input)
     -1:06.6 vim-mode:activate-insert-mode (input.hidden-input)
     -1:05.9 core:move-right (input.hidden-input)
     -1:02.8 core:backspace (input.hidden-input)
     -0:54.5 core:save (input.hidden-input)
     -0:29.0 settings-view:open (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:05.1 command-palette:toggle (input.hidden-input)
     -0:03.4 core:select-all (input.hidden-input)
     -0:02.6 core:confirm (input.hidden-input)
     -0:02.6 markdown-preview:toggle (input.hidden-input)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "oceanic-next"
    ],
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_Store",
      "Thumbs.db",
      ".meteor"
    ],
    "disabledPackages": [
      "minimap",
      "welcome",
      "git-plus"
    ]
  }
}

Installed Packages

# User
autocomplete-plus, v2.4.1
autocomplete-snippets, v1.0.1
docblockr, v0.6.3
emmet, v2.3.4
fancy-new-file, v0.7.0
file-types, v0.3.0
git-control, v0.1.8
language-spacebars, v0.2.2
linter, v0.12.0
linter-csslint, v0.0.11
linter-eslint, v0.4.1
linter-jsonlint, v0.1.2
markdown-format, v2.5.0
markdown-scroll-sync, v0.1.0
meteor-api, v2.12.0
oceanic-next, v0.1.1
react, v0.9.10
terminal-panel, v1.9.2
underscorejs-snippets, v0.2.2
vim-mode, v0.36.0
vim-surround, v0.4.2

# Dev
No dev packages

TypeError: undefined is not a function

TypeError: undefined is not a function
  at /home/despairblue/.atom/packages/markdown-scroll-sync/lib/main.coffee:96:24
  at MarkdownScrlSync.module.exports [as roaster] (/usr/share/atom/resources/app.asar/node_modules/roaster/lib/roaster.js:66:14)
  at MarkdownScrlSync.scroll (/home/despairblue/.atom/packages/markdown-scroll-sync/lib/main.coffee:96:6)
  at /home/despairblue/.atom/packages/markdown-scroll-sync/lib/main.coffee:73:10

Also, the tab bar disapears.

Repro Steps

  1. open a markdown file
  2. open the markdown preview
  3. scroll

Command History

     -0:48.4 pane-container:active-pane-item-changed (atom-pane-container.panes)
     -0:48.4 pane:active-item-changed (atom-pane.pane.active)
     -0:45.6 cursor:moved (atom-text-editor.editor)
     -0:45.6 selection:changed (atom-text-editor.editor)
     -0:23.3 cursor:moved (atom-text-editor.editor)
     -0:23.3 selection:changed (atom-text-editor.editor)
     -0:03.6 pane-container:active-pane-item-changed (atom-pane-container.panes)
     -0:03.6 pane:active-item-changed (atom-pane.pane.active)
     -0:01.2 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:00.0 core:confirm (atom-text-editor.editor.mini)
     -0:00.0 bug-report:open (atom-text-editor.editor.is-focused)

Versions

  • Atom: 0.205.0
  • Atom-Shell: 0.22.3
  • OS: linux 3.14.43-2-lts
  • Misc
    • apm 0.168.0
    • npm 2.5.1
    • node 0.10.35
    • python 2.7.10
    • git 2.4.2

This report was created in and posted from the Atom editor using the package bug-report v0.7.0.

where is the preview

you said ' open the preview',when I open *.md file I can't find how to open preview.i'm confused....

Issue with begining of the file

Here is a bad case with the top of the file.

Here is the file. note that my cursor in on top of the file and that the tile isnt shown in the preview

screen shot 2015-03-12 at 13 52 10

Uncaught Error: Cannot find module 'roaster'

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.210.0
System: Microsoft Windows 7 Enterprise
Thrown From: markdown-scroll-sync package, v0.4.0

Stack Trace

Uncaught Error: Cannot find module 'roaster'

At module.js:330

Error: Cannot find module 'roaster'
    at Module._resolveFilename (module.js:328:15)
    at Function.Module._resolveFilename (C:\Users\michalr1\AppData\Local\atom\app-0.210.0\resources\app.asar\src\module-cache.js:383:52)
    at Function.Module._load (module.js:270:25)
    at Module.require (module.js:357:17)
    at require (module.js:376:17)
    at /C:/Users/michalr1/.atom/packages/markdown-scroll-sync/lib/main.coffee:19:27
    at process._tickCallback (node.js:357:13)

Commands

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-dark-syntax"
    ],
    "disabledPackages": [
      "autosave",
      "markdown-format",
      "markdown-format"
    ]
  }
}

Installed Packages

# User
markdown-scroll-sync, v0.4.0

# Dev
No dev packages

Uncaught TypeError: Cannot read property 'getMaxScreenColumn' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.186.0
System: Mac OS X 10.10.2
Thrown From: markdown-scroll-sync package, v0.1.1

Stack Trace

Uncaught TypeError: Cannot read property 'getMaxScreenColumn' of undefined

At /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1082

TypeError: Cannot read property 'getMaxScreenColumn' of undefined
  at DisplayBuffer.module.exports.DisplayBuffer.clipScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1082:35)
  at DisplayBuffer.module.exports.DisplayBuffer.bufferPositionForScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1036:20)
  at TextEditor.module.exports.TextEditor.bufferPositionForScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1252:33)
  at /Users/benny/.atom/packages/markdown-scroll-sync/lib/main.coffee:51:25

Commands

     -3:07.5 core:move-right (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -3:07.1 snippets:next-tab-stop (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
  8x -3:03.4 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
  2x -2:40.9 snippets:next-tab-stop (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
  4x -2:16.7 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -1:59.0 core:move-right (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -1:57.4 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
  2x -1:52.8 core:move-right (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -1:49.7 snippets:next-tab-stop (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
  3x -1:41.4 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -0:47.4 core:save (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -0:43.9 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -0:41.9 core:save (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -0:41.2 snippets:next-tab-stop (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
  2x -0:32.3 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -0:30.2 core:save (atom-text-editor.editor.vim-mode.insert-mode.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
Remote-FTP, v0.6.2
Sublime-Style-Column-Selection, v1.2.3
atom-alignment, v0.11.0
atom-beautify, v0.21.4
autocomplete-paths, v1.0.2
autocomplete-plus, v2.4.1
autocomplete-snippets, v1.0.1
change-case, v0.5.1
color-picker, v1.4.4
emmet, v2.3.4
file-icons, v1.5.1
japanese-wrap, v0.2.4
markdown-scroll-sync, v0.1.1
minimap, v4.5.0
project-manager, v1.15.5
vim-mode, v0.36.0

# Dev
No dev packages

does not work

I've read all comments on this feed and tried to emulate every possible environment by disabling all other possible third-party tie-in contingencies. It still does not work so I've given up.

Mark if you can get this to work, it's a big deal for the Markdown community on Atom. It's frankly surprising that Atom hasn't focused on this feature themselves. Someone eventually will as it's too important of a feature to ignore.

Mark one suggestion would be for you to document your own working environment as a baseline. If we could start from your working instance and then collectively enable third-party tools until we identify the culprit, it would make it much easier for you to remediate.

Uncaught TypeError: _this.resultNode.scrollIntoView is not a function

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.15
System: Mac OS X 10.11.1
Thrown From: markdown-scroll-sync package, v0.4.2

Stack Trace

Uncaught TypeError: _this.resultNode.scrollIntoView is not a function

At /Users/isis/.atom/packages/markdown-scroll-sync/lib/main.coffee:116

TypeError: _this.resultNode.scrollIntoView is not a function
  at /Users/isis/.atom/packages/markdown-scroll-sync/lib/main.coffee:116:21
  at MarkdownScrlSync.module.exports [as roaster] (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/roaster/lib/roaster.js:69:14)
  at MarkdownScrlSync.scroll (/Users/isis/.atom/packages/markdown-scroll-sync/lib/main.coffee:104:6)
  at /Users/isis/.atom/packages/markdown-scroll-sync/lib/main.coffee:81:10

Commands

     -6:24.1.0 settings-view:open (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  2x -5:28.9.0 markdown-preview:toggle (atom-text-editor.editor.is-focused)
     -2:42 core:save (atom-text-editor#markdown-deluxe.fontFamily.editor.mini.is-focused)
     -2:13.8.0 core:backspace (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
     -2:08.4.0 core:save (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
  2x -1:51.5.0 core:backspace (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
     -1:48.1.0 core:save (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
  2x -1:34.6.0 core:backspace (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
     -1:31.5.0 core:save (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
  2x -1:24.7.0 core:backspace (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
     -1:01.5.0 core:save (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
     -0:39.5.0 core:backspace (atom-text-editor#markdown-deluxe.width.editor.mini.is-focused)
     -0:04.1.0 markdown-preview:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "markdown-preview-plus",
      "spell-check",
      "markdown-deluxe"
    ],
    "openEmptyEditorOnStart": false
  }
}

Installed Packages

# User
markdown-scroll-sync, v0.4.2

# Dev
No dev packages

Object.TextEditor is deprecated.

The TextEditor constructor is no longer public.

To construct a text editor, use atom.workspace.buildTextEditor().
To check if an object is a text editor, use atom.workspace.isTextEditor(object).

Object.TextEditor (/Applications/Atom.app/Contents/Resources/app.asar/exports/atom.js:39:14)
MarkdownScrlSync.activate (/Users/shafreeck/.atom/packages/markdown-scroll-sync/lib/main.coffee:24:35)
Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:183:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:156:32)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:149:26)

Scrolling scrolls atom itself out of view

  1. open a long markdown file
  2. open the preview
  3. scroll down very fast

Happens on linux and mac. The first screenshot is from linux with atom 0.206.0, the next one is from mac with atom 0.204.0
screen shot 2015-06-05 at 20 14 36

Not working with GFM disabled

Sorry, but it is not working for me. No scroll at all. Latest version of Atom. I disabled all other markdown-related plugins except for the core markdown-preview.

Issue with end of file

thanks for your extension!

i think there is a small issue with end of file. see the attached screenshot. the top of the markdown preview is higher than the top of the .md text edit window.

So the end of the .md text isnt shown in the preview, even if my cursor is at the very end of the .md

screen shot 2015-03-11 at 10 39 38

Causes an error when source-preview pane is opened

Opening a source-preview pane triggers the following error from this package…

Atom Version: 1.4.3
System: Mac OS X 10.11.3
Thrown From: markdown-scroll-sync package, v2.1.1

Stack Trace

Uncaught TypeError: Cannot read property 'split' of undefined

At /Users/Dan/Library/Application%20Support/Atom/packages/markdown-scroll-sync/lib/main.coffee:44

TypeError: Cannot read property 'split' of undefined
    at isMarkdown (/Users/Dan/Library/Application Support/Atom/packages/markdown-scroll-sync/lib/main.coffee:29:46)
    at /Users/Dan/Library/Application Support/Atom/packages/markdown-scroll-sync/lib/main.coffee:33:10
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:333:27
    at Pane.module.exports.Pane.observeActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:196:7)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:331:42
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at PaneContainer.module.exports.PaneContainer.setActivePane (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:196:22)
    at Pane.module.exports.Pane.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:623:15)
    at Pane.module.exports.Pane.split (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:712:15)
    at Pane.module.exports.Pane.splitRight (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:672:19)
    at PreviewView.module.exports.PreviewView.show (/Users/Dan/Library/Application Support/Atom/packages/source-preview/lib/preview-view.coffee:111:23)
    at Object.module.exports.toggle (/Users/Dan/Library/Application Support/Atom/packages/source-preview/lib/main.coffee:33:13)
    at atom-text-editor.subscriptions.add.atom.commands.add.source-preview:toggle (/Users/Dan/Library/Application Support/Atom/packages/source-preview/lib/main.coffee:13:47)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at KeymapManager.module.exports.KeymapManager.terminatePendingState (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:510:14)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:386:23)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -4:41 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -4:40.5.0 core:backspace (atom-text-editor.editor.is-focused)
     -4:40.1.0 editor:newline (atom-text-editor.editor.is-focused)
  7x -4:38.5.0 core:undo (atom-text-editor.editor.is-focused)
     -4:32.4.0 core:save (atom-text-editor.editor.is-focused)
  2x -4:27.6.0 editor:toggle-soft-wrap (atom-text-editor.editor.is-focused)
     -4:22.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -4:22.2.0 editor:newline (atom-text-editor.editor.is-focused)
     -4:21.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -4:21 editor:newline (atom-text-editor.editor.is-focused)
     -4:19.3.0 core:save (atom-text-editor.editor.is-focused)
  4x -4:12.7.0 source-preview:toggle (atom-text-editor.editor.is-focused)
  2x -3:30.4.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
  4x -3:29 core:backspace (atom-text-editor.editor.is-focused)
     -3:18.8.0 core:save (atom-text-editor.editor.is-focused)
  3x -1:34.7.0 source-preview:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "customFileTypes": {
      "source.js": [
        "ffx"
      ],
      "text.xml": [
        "als",
        "sdef"
      ],
      "text.xml.plist": [
        "plist"
      ]
    },
    "disabledPackages": [
      "autocomplete",
      "remember-session",
      "file-type-icons",
      "red-wavy-underline",
      "color-gutter",
      "word-count",
      "seti-icons",
      "livereload",
      "environment",
      "test-status",
      "tree-view-breadcrumb",
      "circle-ci",
      "travis-ci-status",
      "regex-railroad-diagram",
      "Zen",
      "metrics",
      "project-environment",
      "language-dots",
      "language-env",
      "plist-converter",
      "build",
      "pigments",
      "markdown-toc",
      "contextual-preview",
      "emmet",
      "keybinding-cheatsheet",
      "language-cjsx",
      "url-tidy",
      "multiple-keymaps",
      "preview",
      "synced-sidebar",
      "git-travel",
      "tree-view-git-branch",
      "tree-view-git-projects",
      "package-templates",
      "follow-finder-aliases",
      "new-tab",
      "linter-scss-lint",
      "atom-react-preview",
      "env-from-shell",
      "imdone-atom",
      "tablr"
    ],
    "ignoredNames": [
      ".DS_Store",
      "._*",
      "Icon",
      ".git",
      "*.pyc",
      "*.rsrc"
    ],
    "openEmptyEditorOnStart": false,
    "projectHome": "~/Library/Application Support/Atom/dev/packages",
    "themes": [
      "nucleus-dark-ui",
      "adventurous-syntax"
    ]
  }
}

Installed Packages

# User
adventurous-syntax, v0.2.0
api-docs, v0.0.3
atom-beautify, v0.28.21
atom-calca, v0.3.0
atom-html-preview, v0.1.13
atom-smart-tabs, v0.1.0
atom-touch-events, v0.23.0
auto-detect-indentation, v0.4.2
auto-update-packages, v1.0.0
autoclose-html, v0.20.0
autocomplete-html-entities, v0.1.0
autocomplete-json, v1.5.0
autocomplete-modules, v1.3.1
autocomplete-paths, v1.0.2
autocomplete-ruby, v0.1.0
autocomplete-sass, v0.1.0
autocomplete-swift, v1.0.1
autohide-tree-view, v0.25.1
bezier-curve-editor, v0.7.2
browser-plus, v0.0.54
build-npm-apm, v0.8.0
build-xcodebuild, v0.1.0
clipboard-plus, v0.5.1
coffee-porter, v0.8.1
color-picker, v2.1.1
copy-path, v0.3.1
cson, v2.0.1
css-snippets, v0.9.0
custom-title, v1.0.1
default-language, v0.2.0
disable-grammars, v0.1.1
disable-keybindings, v0.6.0
editorconfig, v1.2.4
external-open, v0.6.1
file-icons, v1.6.14
file-types, v0.5.1
flex-tool-bar, v0.7.3
flexbox-snippets, v0.3.0
html-id-class-snippets, v1.4.1
jQuery, v1.2.1
jade-snippets, v0.5.0
language-ansible, v0.1.3
language-apache, v1.4.0
language-gitignore, v0.2.0
language-haml, v0.23.15
language-jade, v0.6.3
language-postcss, v1.1.3
language-svg, v0.9.0
language-swift, v0.4.0
linter, v1.11.3
linter-ansible-lint, v0.0.7
linter-coffeelint, v1.1.2
linter-doiuse, v0.2.3
linter-htmlhint, v1.0.2
linter-jade, v0.3.2
linter-js-yaml, v1.2.5
linter-jshint, v1.3.0
linter-jsonlint, v1.1.5
linter-less, v2.4.0
linter-markdown, v1.4.2
linter-perl, v0.7.2
linter-rubocop, v0.4.7
linter-sass-lint, v1.0.4
linter-shellcheck, v1.1.0
linter-stylelint, v1.10.4
linter-swiftc, v2.0.0
linter-swiftlint, v1.1.0
linter-xmllint, v1.3.0
make-executable, v0.1.1
markdown-preview-plus, v2.2.2
markdown-scroll-sync, v2.1.1
markdown-table-formatter, v2.7.2
markdown-themeable-pdf, v0.10.2
move-status-items, v0.0.11
navigate, v0.1.13
new-file-plus, v0.2.1
nucleus-dark-ui, v0.7.4
open-recent, v5.0.0
package-settings, v1.0.1
pain-split, v1.4.0
pdf-view, v0.39.0
postcss-sorting, v2.1.3
project-manager, v2.7.6
react, v0.14.1
react-snippets, v0.3.0
rest-client, v0.5.0
sequential-command, v0.3.0
simple-drag-drop-text, v0.3.0
source-preview, v0.5.0
source-preview-jade, v0.1.1
source-preview-react, v0.2.0
svg-preview, v0.7.3
sync-settings, v0.6.0
tab-control, v0.6.9
tabs-to-spaces, v1.0.1
takana-atom, v0.1.0
terminal-panel, v1.14.1
text-manipulation, v0.6.0
tool-bar, v0.2.0
tree-view-git-status, v0.2.2
wordcount, v2.6.0

# Dev
atom-beautify, v0.28.15
browser-plus, v0.0.45
color-picker, v2.0.13
modular-keymaps, v0.0.0
nucleus-dark-ui, v0.6.5
terminal-panel, v1.14.1
text-manipulation, v0.6.0

Scrolling not quite synchronized

A large MD file will tend to lose sync offset as the file is scrolled down. The offset can even grow as large as a full screen height. I'm assuming this is due to a scroll sync based on an absolute position.

If possible, could it synchronize based on a percentage of the position in the file instead? That way, scrolling even 90% would still be accurate. Scrolling to the bottom would synchronize to the bottom of the preview.

Not working too

I’ve tried "Claudio-silva" to enable language-gfm ,but still not working. :(

Slows down with large files: Configurable delay?

When using large files this can slow down very much. E.g. try the license file of Atom.
syncissues

So what I suggest would be adding a (configurable) delay so that it is not instantly synced to reduce system load.

Not really sync

I have the problem, I have a very big file, and if I search for a title, I see this on the left side, but not on the right. I have to scroll 2-3 screens to the the title.

Does not sync at all

I tested it with Atoms license file and it does not do anything at all:
markdownnosync

Atom 1.0.11
Windows 7

Uncaught TypeError: object is not a function

Comment :
I'm totally new to signaling errors on git but I just tried to install your package in atom through the apm install process and it doesn't work. I was on the 1.0.7 when I installed markdown-scroll-sync, on Linux Mint the error told me it could be related to not being in 1.0.11 I did the update but it still doesn't work (the error part related to 1.0.11 isn't here anymore), I tried a few basic tests / uninstall / reinstall but nothing worked.

I'm apologizing in advance if it's not the good way to signal the problem or else and thanks for the work in the package, I really hope I make it work, this feature is really missing in atom !

[Generated bug issue from atom]
Atom Version: 1.0.11
System: Linux Mint
Thrown From: markdown-scroll-sync package, v0.4.2

Stack Trace

Uncaught TypeError: object is not a function

At /home/user/.atom/packages/markdown-scroll-sync/lib/main.coffee:23

TypeError: object is not a function
    at /home/user/.atom/packages/markdown-scroll-sync/lib/main.coffee:23:24
    at process._tickCallback (node.js:357:13)

Commands

Config

{}

Installed Packages

# User
markdown-scroll-sync, v0.4.2

# Dev
No dev packages

Does not work with markdown-preview-plus

I like this plugin but I also like to preview LaTeX math. It would be nice if you could make your plugin work with markdown-preview-plus or markdown-preview-katex.

Throwing exception when I have new unsaved files

Hi,

When I have any new unsaved files (so they don't have a path), the package throws an error at times. You're splitting the response to editor.getPath() without checking for an undefined return value on line 29 of main.coffee.

Apologies, I would have submitted a pull request, but I've literally just installed Atom for the first time, and I just signed up for Github to post this message. I'll become au fait with it it all and submit pull requests in future.

Anthony

Uncaught TypeError: undefined is not a function

[Enter steps to reproduce below:]

  1. Add an HTML comment into the doc, e.g.
  2. Scroll away so the comment is not visible, then scroll back to see the comment. The error appears

Atom Version: 0.190.0
System: Mac OS X 10.10.2
Thrown From: markdown-scroll-sync package, v0.3.2

Stack Trace

Uncaught TypeError: undefined is not a function

At /Users/teppo/.atom/packages/markdown-scroll-sync/lib/main.coffee:108

TypeError: undefined is not a function
    at /Users/teppo/.atom/packages/markdown-scroll-sync/lib/main.coffee:130:35
    at MarkdownScrlSync.module.exports [as roaster] (/Applications/Atom.app/Contents/Resources/app/node_modules/roaster/lib/roaster.js:66:14)
    at MarkdownScrlSync.scroll (/Users/teppo/.atom/packages/markdown-scroll-sync/lib/main.coffee:118:19)
    at /Users/teppo/.atom/packages/markdown-scroll-sync/lib/main.coffee:88:19

Commands

     -4:23.1 markdown-preview:toggle (atom-text-editor.editor.is-focused)
  2x -0:50.1 editor:newline (atom-text-editor.editor.is-focused)
  2x -0:49.6 core:move-up (atom-text-editor.editor.is-focused)
  5x -0:44.2 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  }
}

Installed Packages

# User
markdown-scroll-sync, v0.3.2
script, v2.18.0

# Dev
No dev packages

Crashes atom constantly plus shaky syncing

It freezes up the editor more and more until crashing it with lots of scrolling issues reported and finally a X Windows error.

The synchronization is also a bit shaky. Perhaps the DOM-node matching algo is a bit over-reaching? I'd be very happy to see an option to simply derive position from cursors relative position in buf, in relation to relative pos in view. A simple percentage based scrolling that is.

I guess that could solve the whole crashing problem, on my machine in any event..

Here's the last few log lines (there's hundreds repeated):

Note that always get this when having the preview open, and never else. So the spell checking thingie might just be a red herring in this case..

[28272:0502/232701:INFO:CONSOLE(80)] "markdown-scroll-sync: error in bufferPositionForScreenPosition", source: /home/oscar/.atom/packages/markdown-scroll-sync/lib/main.coffee (80)
[28272:0502/232702:INFO:CONSOLE(80)] "markdown-scroll-sync: error in bufferPositionForScreenPosition", source: /home/oscar/.atom/packages/markdown-scroll-sync/lib/main.coffee (80)
[28272:0502/232702:INFO:CONSOLE(80)] "markdown-scroll-sync: error in bufferPositionForScreenPosition", source: /home/oscar/.atom/packages/markdown-scroll-sync/lib/main.coffee (80)
[28272:0502/232702:INFO:CONSOLE(114)] "Error starting spell check task", source: /opt/atom/resources/app.asar/node_modules/spell-check/lib/spell-check-view.js (114)
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 56597 error_code 3 request_code 40 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Problems syncing with code sections

The scroll goes out of sync when it encounters Github flavoured code snippets.

Create a markdown file with the following piece duplicated enough to require scrolling.

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

``` javascript
var foo = function() {
    bar1();
    bar2();
    bar3();
}
```

Editing document breaks sync

If you scroll to end, then write more, the preview does 'page up' a bit, and won't re-sync until scroll. The problem is more pronounced because preview does not 'scroll past end'.

In fact, I now realise it skips around as I type - end of document or not. It does re-centre on cursor if left though, as long as not appending to end...

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.