tekkub / cut-line Goto Github PK
View Code? Open in Web Editor NEWAtom package - cut the current line when no text is selected
Atom package - cut the current line when no text is selected
Love it,
In Sublime I frequently used copy paste and it would automatically duplicate the new content to the line below.
Can we duplicate that functionality here?
What's currently happening is that pasting will paste it in the middle of the line.
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
Object.activate (/Users/frontjet3/.atom/packages/cut-line/lib/cut-line.coffee:4:9)
So I've got a selection of part of a line, and a โ-X will now cut the entire line, regardless of if I have a selection. When I undo, it puts the line back, at the state it should have been, with just the selection cut from the area. One more undo puts it back to the state it was in before I struck โ-X.
I'd expect cut-line to not cut the entire line if I've already got a selection.
Additionally, nothing ever gets copied to the clipboard.
This just started as of the most recent update (v0.6.0).
Editing a document
Nothing in document selected
cmd-f (find)
<find panel is active, find text is highlighted>
cmd-x
!! Cuts the current line in the document !!
Expected:
cut selected text from find panel
When this library is active, you can't use cmd-v to paste. However, Edit -> Paste works. This occurred for me when upgrading to Atom 0.90.0.
I'm using v0.8.0.
Cutting and pasting lines works normally, but if I cut and paste a line (in atom.io) and the copy from external app (in this case chrome) when I hit cmd+v the clipboard is pasted twice.
further to this I copy and paste from other apps or a selection then I see the pasted content being repeated 2, 3 or even 4 times...
disabling, re-enabling the plugin resets the paste repetition to 2.
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
Object.activate (/Users/frontjet3/.atom/packages/cut-line/lib/cut-line.coffee:4:9)
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.activate (/Users/ninomagazzu/.atom/packages/cut-line/lib/cut-line.coffee:3:9)
[Enter steps to reproduce below:]
Atom Version: 0.190.0
System: Mac OS X 10.10.2
Thrown From: cut-line package, v0.10.0
Failed to activate the cut-line package
At Cannot read property 'command' of undefined
TypeError: Cannot read property 'command' of undefined
at Object.module.exports.activate (/Users/yzg/.atom/packages/cut-line/lib/cut-line.coffee:4:25)
at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:225:19)
at /Applications/Atom.app/Contents/Resources/app/src/package.js:206:30
at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:152:15)
at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:199:14)
at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:435:21)
at /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:419:29
at Config.module.exports.Config.transact (/Applications/Atom.app/Contents/Resources/app/src/config.js:302:16)
at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:414:19)
at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:395:46)
{
"core": {
"ignoredNames": [
".git"
],
"disabledPackages": [
"autocomplete"
]
}
}
# User
Sublime-Style-Column-Selection, v1.2.3
autocomplete-plus, v2.9.0
cut-line, v0.10.0
highlight-selected, v0.9.1
html2jade, v0.7.0
language-jade, v0.3.0
# Dev
No dev packages
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
Object.activate (/Users/frontjet3/.atom/packages/cut-line/lib/cut-line.coffee:3:9)
I just updated to 0.9.0 and am having some issues of the plugin cutting two lines when I cut.
I am also if I copy then paste will have two copies of the line in my clipboard. Any thoughts?
In keymaps/cut-line.cson: Use the atom-text-editor
tag instead of the editor
class.
Just noticed on Atom 0.101.0 and cut-line 0.8.0 that cmd+c cuts the line ok but cmd+v now replaces the line instead of inserting the line.
Currently the package doc says that this implements cut-line, but in addition it customizes copy-line and paste-line functionality. Somekind of documentation would help. Especially the paste-line is really difficult to understand.
Both copy-pasting and cut-pasting results in an extra EOL if file is using Windows line endings.
Example:
first
second
third
If I cut first, move cursor to third and paste:
second
first
third
Works fine with Unix EOLs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.