talmand / brackets-select-lines Goto Github PK
View Code? Open in Web Editor NEWBrackets extension to select lines by clicking/dragging in the gutter.
Brackets extension to select lines by clicking/dragging in the gutter.
I think it would be better if you can also select a line with a normal click, and with a shift+click to select more lines
I installed and am writing in Jade.
It doesn't seem to be working so just checking to see if it only works for certain languages?
Thank you!
Hey, thanks for making this plugin! It was the first thing I installed when I started using brackets. I was getting annoyed though, because when highlighting lines the highlight would end and the end of the code (rather than grabbing the full line to the start of the next line). This made copy-pasting lines a pain, the formatting wouldn't behave like I expected coming from other editors. I made a minor change to the code which I think provides behavior consistent with other editors. Now it selects the 0 character at the first line AFTER the end of the selection, allowing for easy copy-pasting of full lines. Also I'm not very good at github, so I'll just leave the code here for you to include if you think it makes sense.
Thanks! Ben
var lineSelecting = function (e) {
var newLine = instance.lineAtHeight(e.pageY);
newLine += 1;
if (!event.ctrlKey) {
instance.setSelection(
{line: startLine, ch: 0}, //startLine < newLine ? 0 : null},
{line: newLine, ch: 0} //startLine < newLine ? null : 0}
);
} else {
instance.addSelection(
{line: startLine, ch: 0}, //startLine < newLine ? 0 : null},
{line: newLine, ch: 0} //startLine < newLine ? null : 0}
);
}
};
When using brackets split screen feature you must first highlight the screen then select the line.
Mousing over the unfocused file's gutter selects text in focused file. For example: If I select the right file then drag my cursor on the left files gutter it selects text in the right file.
Have you tried onmouseup onmousedown?
By default, when the users's cursor is on a line, that line number is highlighted.
Default Brackets behavior (notice the white '30' line number
It would be nice if selecting the entire line (via this extension) also highlighted the line numbers that are selected.
Current extension behavior (notice the line numbers are not highlighted)
First, Thank you! this is great functionality!
Small issue, but annoying:
When you select a line number on the left, the window on the right might move over when you have a long code line, no wrap on, and vertical split.
See screen print for mark up. http://postimg.org/image/9qp9hd9n5/
It would be nice to not move the horizontal orientation of the screen. Just leave it flush left when you select a single or multiple lines.
Thank you again!
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.