Last active
April 5, 2018 13:10
-
-
Save joakimk/5e5fb68bb33ac93f378440ea91ae5b22 to your computer and use it in GitHub Desktop.
Revisions
-
joakimk revised this gist
Apr 5, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ runTestInTmux = (focus) -> relativePath = fullPath.split(projectPath)[1] if focus line = editor.getLastCursor().getBufferPosition().row relativePath = relativePath + ":" + line child.spawnSync("tmux", ["send-keys", "-l", "script/test " + relativePath + "\n"]) -
joakimk revised this gist
Apr 5, 2018 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Atom -> Init Script... child = require "child_process" runTestInTmux = (focus) -> editor = atom.workspace.getActiveTextEditor() @@ -14,10 +14,10 @@ runTestInTmux = (focus) -> line = atom.workspace.getActiveTextEditor().getLastCursor().getBufferPosition().row relativePath = relativePath + ":" + line child.spawnSync("tmux", ["send-keys", "-l", "script/test " + relativePath + "\n"]) atom.commands.add "atom-text-editor", "custom:save-and-run-test-at-current-line", -> runTestInTmux(true) atom.commands.add "atom-text-editor", "custom:save-and-run-test", -> runTestInTmux(false) -
joakimk revised this gist
Apr 5, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Atom -> Keymap... 'atom-text-editor.vim-mode-plus:not(.insert-mode)': 'm': 'custom:save-and-run-test-at-current-line' -
joakimk revised this gist
Apr 5, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Atom -> Keymap 'atom-text-editor.vim-mode-plus:not(.insert-mode)': 'm': 'custom:save-and-run-test-at-current-line' -
joakimk created this gist
Apr 5, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ # Atom -> Init Script... child = require 'child_process' runTestInTmux = (focus) -> editor = atom.workspace.getActiveTextEditor() editor.save() fullPath = editor.getPath() projectPath = atom.project.getDirectories()[0].getPath() + "/" relativePath = fullPath.split(projectPath)[1] if focus line = atom.workspace.getActiveTextEditor().getLastCursor().getBufferPosition().row relativePath = relativePath + ":" + line child.spawnSync('tmux', ['send-keys', '-l', 'script/test ' + relativePath + '\n']) atom.commands.add 'atom-text-editor', 'custom:save-and-run-test-at-current-line', -> runTestInTmux(true) atom.commands.add 'atom-text-editor', 'custom:save-and-run-test', -> runTestInTmux(false) This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ # Atom - Keymap 'atom-text-editor.vim-mode-plus:not(.insert-mode)': 'm': 'custom:save-and-run-test-at-current-line' 'M': 'custom:save-and-run-test'