lkcampbell / brackets-ruler Goto Github PK
View Code? Open in Web Editor NEWAn extension for Brackets that adds an adjustable column ruler to the editor.
An extension for Brackets that adds an adjustable column ruler to the editor.
Repro Steps
Expected behavior:
Ruler is lined up properly with document columns
Observed behavior:
Ruler is misaligned. Tick mark spacing is too narrow.
Add a package.json file so it shows up nicely in the extension manager.
Hi,
Would it be possible to somehow get the text to wrap at the guide width and still have the editor at full-screen?
Steps to Repro
Results
Can't scroll to the bottom of the file.
Putting in a reminder to myself to add the ability to pick any color for the Ruler Guide. This will not be available until Sprint 40 because it depends on: codemirror/codemirror5@45b0c7d
OS: Windows 7
Build: sprint 25 development build 0.25.0-0 (master 8653151b1)
Repro Steps:
Expected Behavior:
Ruler is hidden. It serves no purpose when there is no open document.
Observed Behavior:
Ruler is shown
The Ctrl+Alt+R shortcut key is going to eventually conflict with:
which is the pull request to add Recent Project Navigation.
Need to remove the shortcut keys since people rarely have to toggle the ruler and guide on or off on a frequent basis.
OS: Windows 7
Build: sprint 25 development build 0.25.0-0 (master 1339fc9cd)
Repro Steps:
Observed Behavior:
The column guide is drawn over the toolbar
Expected Behavior:
The toolbar is drawn over the column guide.
Repro Steps:
Expected Result:
Column guide toggles off or on every time you click it.
Observed Result:
Column guide stays on no matter how many times you click it.
Additional Notes:
This worked before. Must have broke it when putting in the click and drag event for the ruler.
OS: Windows 7
Build: sprint 25 development build 0.25.0-0 (master 8653151b1)
Repro steps:
Expected Behavior:
Last number stays in the same place throughout any horizontal resizing.
Observed Behavior:
Last number shifts one pixel left as the window edge gets close to it.
Just a reminder to add Preference Hints for version 1.4 of Brackets when it's available
OS: Mac OSX Mavericks
Brackets Version: sprint 37 development build 0.37.0-0 (master 715589c46)
Extension Version: 1.1.8
Repro Steps:
Expected Results:
No errors or warnings for the Column Ruler extension
Observed Results:
Several Preferences deprecation warning about Column Ruler extension.
I've disabled all extensions except for brackets-ruler. I've reset the theme to the Brackets default. No matter what, the ruler isn't scaled correctly.
The guide displays in the proper place relative to my guidePosition setting, but relative to the ruler, it appears to be in the wrong place. For every 10 columns of actual real estate, the ruler thinks it's 9 columns. So, when I have guidePosition set to 80, the guide appears to be at 72, relative to the ruler.
I'm on ...
Repro Steps:
Observed Result:
Error logged in console: "Uncaught TypeError: Cannot call method 'is' of null "
Expected Result:
No ruler errors logged in console.
Right now if you right-click in the ruler, it interprets it the same as a click and moves the guide line.
It'd be nice if I could right-click in the ruler and get a context menu with options to hide the ruler and hide the guide line.
In any case, I didn't expect it to move the guide line when I right-clicked in the ruler.
Repro Steps:
Observed Behavior:
Ruler is shown
Expected Behavior:
Ruler is not shown. It is never shown in an empty main editor.
Repro Steps:
Observed Behavior:
Column Guide can be seen, and toggled on and off when there is no document open.
Expected Behavior:
Column Guide is not shown and cannot be toggled when there is no document open.
Repro Steps:
Observed Results:
Eventually, you will hit a "dead" spot on the ruler where the clicks start producing the following error in the console log:
Uncaught TypeError: Cannot read property '1' of null
Expected Results:
Nothing should show up in the console log no matter where you click on it.
Additional notes:
This happens on the right edge of the ruler as well.
OS: Windows 7
Build: sprint 28 development build 0.28.0-0 (master )
Repro Steps:
Observed Behavior:
A white rectangular section flickers briefly over the entire screen, sometimes leaving white spaces on the side bar and the tool bar.
Expected Behavior:
No white rectangular flicker, no repaint problems.
Other Notes:
This is a problem recently introduced in the last dev build. I don't see the problem in Sprint 27.
OS: Windows 7
Build: sprint 25 development build 0.25.0-0 (master 8653151b1)
Repro steps:
Expected Result:
There is a major tick mark (i.e. white instead of gray) at the 95th tick mark.
Observed Result:
There is a minor tick mark (i.e. gray instead of white) at the 95th tick mark.
OS: Windows 7
Build: sprint 25 development build 0.25.0-0 (master 1339fc9cd)
Repro Steps:
Observed Results:
The ruler is hidden. The menu item is still checked, indicating the ruler should be shown.
Expected Results:
The ruler is shown.
OS: Windows 7
Build: sprint 28 development build 0.28.0-0 (master 97b957e80)
Repro Steps:
Expected Results:
Column guide should be visible when it is automatically moved into the editor viewer and not visible when it is automatically moved behind the vertical scroll bar.
Observed Results:
Column guide stays hidden the whole time.
Hey Lance,
I tested your Column Ruler extension with splitview (Jeff/Splitview-factory) and it doesn't work as designed.
You can test with the jeff/splitview-factory branch
If you move your mouse over the guide, the cursor turns into an arrow (ie, not the text vertical bar cursor). Clicking does not change the selection. Clicking and dragging does not move the guide.
Ubuntu 13.10
setValue is called to set preference 'guideEnabled,' use PreferencesManager.set instead.
It seems you are using this several times. I see there is one more error on first load
there is case when the $tickMark is undefined
tickPosX = $tickMark.position().left;
tickWidth = $tickMark.width();
breaks, I have replaced with
tickPosX = $tickMark.length!=0 ? $tickMark.position().left : 800;
tickWidth = $tickMark.length!=0 ? $tickMark.width() : 0;
saw that inthe debug console of brackets. I don't know how the preferences should be managed but maybe you need to update some your code
OS: Windows 7
Build: sprint 25 development build 0.25.0-0 (master 8653151b1)
Repro Steps:
Expected Results:
The ruler lengths at step 2 and step 4 are the same.
Observed Results:
The ruler lengths at step 2 and step 4 are often different.
OS: Windows 7
Build: sprint 27 development build 0.27.0-0 (master dd6bdc9a4)
Repro steps:
Expected result:
Column guide should continually span the entire height of the editor window as the editor is resized.
Observed result:
Column guide is too short and does not span the entire height of the editor window. This problem is either constant or flickers back and forth between the correct and incorrect height, depending on how close the right edge of the text line is to the right side of the editor window.
Edit Update 6/22/13: Update Build and rewrote repro steps to make this bug easier to repro
Having multiple guides would be helpful.
I try to use Brackets in almost all web projects now. But not in all projects we have set the line length to 80 columns in our dev guides.
I suggest an array of guides like it is in Sublime Text 2/3
I don't know if its a good idea to allow different styles per guide or if all guides should use same style, color and thickness.
I have Brackets Git installed alongside this, which loads after the ruler/guide has already loaded. Brackets Git adds an additional gutter next to the line numbers which pushes the text over 1 character, but the ruler/guide does not update its position until something is typed.
OS: Windows 7
Build: sprint 25 development build 0.25.0-0 (master 1339fc9cd)
Repro Steps:
Observed Results:
The status bar is missing until the editor is resized manually.
Expected Results:
The status bar is visible.
OS: Windows 7
Build: sprint 26 development build 0.26.0-0 (master adda76c23)
Repro Steps:
Observed Behavior:
The column guide is drawn over the side panel.
Expected Behavior:
The side panel is drawn over the column guide.
OS: Mac OSX Mavericks
Brackets Version: Release 1.1 development build 1.1.0-0 (master 4bfed93b8)
Extension Version: 2.3.5
Repro Steps:
Observed Results:
Console error in Dev Tools:
Uncaught TypeError: Cannot read property 'which' of undefined main.js:192
Expected Results:
No console error
OS: Windows 7
Brackets Build: sprint 26 development build 0.26.0-0 (master 22192c9e7)
Repro Steps:
Expected results:
Ruler shows and cursor stays on line 14.
Observed results:
Ruler shows and cursor bumps down to an undefined line just below line 14.
Repro:
Create a fairly long brackets text file and word wrap it. As the word wrapped lines get longer and longer, the ruler gets longer as well. When it get up to 1000 columns long, the typing performance is sluggish. Removing the word wrap makes the type speed faster.
Expected behavior: The typing performance should stay the same whether the document is word wrapped or not.
Proposed solution: In the current code base, the ruler length is based on the longest line length in the document. When word wrap is on, the ruler length should be based on the width of the main editor frame. This will fix this problem in three ways:
First, the ruler will be shorter, which will make the code that updates the ruler length perform better.
Second, the ruler length will be updated on editor resize instead of text change, taking the pressure off of the typing.
Third, I can get rid of the weird word wrap flip workaround I had to use because CodeMirror doesn't define the longest line length in word wrap mode. This workaround is the most likely culprit for the performance problems.
Other Notes:
The fix for this issue depends upon the merging of pull request #4152.
OS: Mac OSX Mavericks
Brackets Version: Release 0.44 development build 0.44.0-0 (master 7b45d825a)
Extension Version: 2.3.4
Repro Steps:
Observed Results:
Zero tick mark is one pixel farther left than it should be.
Expected Results:
Zero tick mark should be lined up correctly.
Other Notes:
This is just one of several Themes that exhibit this problem.
Hi Lance,
As far as I can see, brackets-ruler is the only extension that listens for the Editor optionChange
event. In Brackets 36 and lower, this event exposes the CodeMirror names for the options. Starting with Brackets 37, I'd like to make it expose the Brackets preference names for the sake of consistency.
The current bit of code in your extension is:
if (option === "lineNumbers") {
_updateRulerScroll();
_updateGuideVisibility();
} else if (option === "lineWrapping") {
_updateRulerLength();
_updateGuideHeight();
}
I think it just needs to become:
if (option === "showLineNumbers" || option === "lineNumbers") {
_updateRulerScroll();
_updateGuideVisibility();
} else if (option === "wordWrap" || option === "lineWrapping") {
_updateRulerLength();
_updateGuideHeight();
}
and your extension will be backwards and forward compatible. Does that seem reasonable?
Can someone give me an idea why I would need to use rulers ? :-)
OS: Mac OSX Mavericks
Brackets Version: Release 0.44 development build 0.44.0-0 (master 27e6c5abb)
Extension Version: 2.3.3
Repro Steps:
Expected Results:
All unit tests pass.
Observed Results:
Four failures.
OS: Windows 7
Brackets Build: sprint 26 development build 0.26.0-0 (master 69198e6bb)
Repro Steps:
Observed Behavior:
The gutter gets wider but the ruler does not align with the gutter.
Expected Behavior:
The gutter gets wider and the ruler aligns with the gutter.
OS: Mac OSX Mavericks
Brackets Version: Release 1.3 development build 1.3.0-0 (master 49553b361)
Extension Version: 2.3.7
Repro Steps:
Expected Results:
All unit tests pass.
Observed Results:
One failure on should EQUAL Editor Scroll after CHANGING Gutter Width
test.
Add in documentation on the command ids for the extension and examples of how to add shortcut keys for those commands.
Repro Steps:
Observed Result:
The ruler does not realign itself properly to the left when the number gutter appears or disappears.
Expected Result:
The ruler realigns itself properly to the left each time the line numbers are toggled.
Other Notes:
The fix for this issue depends upon the merging of pull request #4152.
I'd like to theme the properties of the guide with CSS, if possible. Right now it looks like most of the style is being added with JavaScript instead of CSS.
Per this discussion:
https://groups.google.com/forum/#!topic/brackets-dev/wKjCjhk0plM
move activeEditorChange listener code into currentDocumentChange listener code so the scroll event doesn't fire on inline editors
If I ever enable the Column Guide or Column Ruler options, the ruler is always visible on subsequent launches of Brackets. The ruler is visible even if I have it disabled on the View menu. If I have the Column Guide option enabled it is not visible during launch.
Note that this only happens on the first file automatically opened by Brackets during launch. If I then proceed to open another file, the view options are respected and both the ruler and the guide follow what's set in the View menu.
Brackets Sprint 36, Ubuntu 13.10.
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.