Atom.io with Nuclide : Line marker - atom-editor

Before I reset my mac, While using Atom ( with nuclide plugin installed ) I was able to mark lines. ( clicking on left side of line numbers ).
After resetting my mac and installing Atom, I can't find that option. I also tried many Atom plugins but I couldn't find it. Please see the screenshot attached bellow ( I've putted dots on image to show what was it look like ).
Do you know the option / plugin name?
Thanks in advance!

This is from the Nuclide plugin and it's a Breakpoint. It's found in the nuclide-debugger feature.
For this to work, make sure the nuclide-debugger feature is active in Nuclide's config (Settings » Packages » Nuclide):
To add a breakpoint to a line, click the gutter (as you tried), or press F9.

Too late answer but still useful.
install: atom-ide-ui

Related

zsh Spaceship theme customization

I want to change some options of my zsh shell theme spaceship
I currently have the theme installed and active.
I want the theme to always show my current battery life.
See here -> https://denysdovhan.com/spaceship-prompt/docs/Options.html#battery-battery .
I put SPACESHIP_BATTERY_SHOW = always at the very bottom of my ~/.zshrc file.
My problem is that now when I open iterm2 I get the error /Users/***/.zshrc:12: command not found: SPACESHIP_BATTERY_SHOW
Am I putting the configuration in the wrong spot?
Thanks in advance.
Thanks #Adaephon
I removed the space and changed it to SPACESHIP_BATTERY_SHOW=always

Panels not visible in React Storybook

I am using Storybook version 3.3.15 on Windows 7 running node version 6.3.1 and npm version 3.10.6.
On running storybook, I see 'No panels Available' message in the bottom of the page where actions panels are rendered. I have imported addon-actions in addons.js: import #storybook/addon-actions/register and the module is also present in node_modules folder. I am not getting any errors regarding this during webpack compliation or in browser console.
How do I make the Action Panel appear?
Note: I cannot update the Node and NPM versions because I am working on a professional level app wherein lots of people are involved and its a very big codebase.
In my case they were simply hidden and in the wrong orientation. Had to use the D and A keyboard shortcuts to make them appear again.
in my case just hitting d worked
For me the whole main menu disappeared at one point. The only thing that helped was running sessionStorage.clear() in the console and then refreshing the page.
First of all, check if you have the addon panel set to show/hide in the dropdown menu at the top left of the Stoybook UI screen, also check the dropdown item called 'change addons orientation' (mine was changed and was bumped off screen because of screen width).
If that doesn't work, try setting the options in the storybook config.js file:
In the Storybook config.js file you can add an options parameter for some default settings, this includes setting the visibility and position of the addons panel.
import { addParameters } from '#storybook/react';
// settings for storybook - show and position addon panel
addParameters({
options: {
// display panel that shows addon configurations
showPanel: true,
// where to show the addon panel --- #type {('bottom'|'right')}
panelPosition: 'bottom',
}
});
In my case I was missing the .storybook/addons.js file. It looks like this became a requirement in a recent version because the actions add-on used to work fine for me initially.
To clarify potential confusion:
As the documentation specifies, you need to have a addons.js file in your hidden .storybook/ directory (most likely at the root of your project) even if all it contains is just this 1 line.
import '#storybook/addon-actions/register';
I Just found out it by trying different keys on my keyboard:
If you press "S" - it switches Sidebar in StoryBook Of
and On! Try it!
My Browser: Chrome, Operating system: Mac OS
In Mac I solved it by pressing fn + s.
I was having this problem; hitting S would shift my components without showing the sidebar, and even after clearing my localStorage and sessionStorage I could barely see the edge of my sidebar.
Then, I realized that I had zoomed in to see my components more closely, and that the sidebar was hiding/showing, but just off-screen.. I just needed to zoom out. 🤦‍♂️
Sharing here in case anyone makes the same mistake.
I had a similar problem and installing #storybook/addons (in addition to the steps you mentioned) fixed it.
Run:
npm i -D #storybook/addons

Atom Code Editor. Why is my code not in color?

I started using the Atom Code editor recently. During my last project, I installed a couple of tools to make my coding more interactive.
One of the features added color to my code which makes it easier to read.
However, I started a new project today and the code is all white on a dark background. How do I color my code?
I have attached two screenshots of the colored code and the non colored code just to illustrate what I mean but its pretty straightforward.
Atom might not be recognizing the syntax of your code immediately. Check the bottom right corner of the screen to make sure atom has the correct language/file extension selected. You can manually select this if atom doesn't do it automatically. You might also need to install some new packages if atom isn't recognizing your code.
Use ctrl+shift+l to open the language selector, and select the auto-detect option.
I had the same problem. Try switching to HTML(Go) in the bottom right corner. It's between UTF-8 and Github.
Why isn't anybody mentioning the file extension?
Your "Project Greg.html" is HTML.
But "Random Quote Machine" has NO extension.
This is why the syntax isn't showing.
The current version of Atom I'm running as of Oct 2018 seems to identify code by tags. So even if I select HTML manually, unless the file has <html> tag, it still doesn't mark it as HTML. I just add redundant commented out <!-- <html> --> tag in the beginning of the file and it does the trick.
You may need to install a new package for Atom. You can find different language packages for Atom here: https://atom.io/packages
For example, for React.js, install the react package.
In your terminal, type this command: apm install react
More info for react packages:
https://atom.io/packages/react
https://orktes.github.io/atom-react/
Check the bottom right corner of the screen to make sure atom has the correct language/file extension selected
If your file has extension HTML or ejs (.html, .ejs) language-ejs package can 't recognize those file.In the bottom right corner of the screen, change the HTML to ejs or javascript, then the atom can recognize that the code your write is parts of ejs. NOte, you need to install language -ejs package first.
Follow the steps:-
File->Settings
Select 'Core' from left pane.
Change color profile to "Use sRGB color profile".
Restart 'Atom'.
Make sure the beginning identifies the file as a html document. I had this problem and just added <!DOCTYPE html> as the very first line and it worked.
Maybe this will helps for someone, but if you tab once this line: <!DOCTYPE html> and it will show coloured HTML code
If the langage set is already the right one,and the code stays grey unless you directly edit it, just try setting another langage then switch back. It worked for me after Atom refused to color an entire copy-pasted HTML page.
I am a very newbie but wanna share what worked for me. Please don't judge me strictly.
Since I work only in Python, it is very convenient to change the grammar to Python every time. How to make it automatic:
File->Settings (or use Ctrl+Comma)
Click Open config folder
Click on styles.less
After all the code, write exactly this source.python {
}
Save
Restart Atom.
You're all set.
Hope this was helpful, couldn't find this solution elsewhere.
The !DOCTYPE html did not change the color for me but in the bottom right is :
CRLF UTF-8 HTML GitHub Git(0) menu options. I selected HTML and in the popup window selected AUTO. The color returned instantly.

Show folder in the tree view in Atom

When I am using rubymine, I can open a panel with ctrl+shift+n and enter something like "users/" and it will show me the users folder in the tree view on the left, how can I do the same in Atom editor? I can open files with ctrl + p, but I can't find anything about going to the folder.
It looks like this functionality is currently not available in Atom. Some related information:
You can reveal the currently edited file in the Tree View using the menu entry Packages > Tree View > Reveal Active File or using the assigned keyboard shortcut (on OS X Cmd+Shift+\)
There's a Tree View Filter package, which seems to be similar to what you're looking for.
The Tree View Search Bar package allows to search the tree view's content.
There's an open issue on the Tree View package to add search capabilities, but it has not been implemented yet.
Looks available to me?
tree-view:reveal-active-file
Cmd + |
Try Shortcuts : ctrl \ or cmd \ to open/close the tree view
if still not opening then check your .atom/config.cson
and check disabledPackages and remove tree-view from it.
and restart your atom again.
if still not open then install it again
https://atom.io/packages/tree-view
NOTE : sometimes it happens if you uninstalled Nuclide package
Had a similar issue after I installed the nuclide.
The problem was that the package disables the standard tree view.
Solution:
Go to Atom Preference > Packages
Enable core Package tree-View
To do this select Atom > Preferences. When your settings show up, click on Packages in the left hand column. Search for the installed package, tree-view. Once it comes up, click on Settings and then uncheck the option Hide VCS Ignored Files.

How to bookmark code in XCode 4?

I couldn't find a way to put a bookmark inside the code in XCode 4. I know about the #pragma mark thing but it's not what I'm looking for. What I need is something that I can put and remove with a mouse click and navigate amongst with next and previous, like in VS.
Is there anything that I'm missing?
Bookmarks seem to have gone the way of the dinosaur in Xcode 4. This wouldn't have been so bad had the jump-to-bookmark popup above the editor in previous versions not also disappeared. The best replacement currently seems to be to use breakpoints (disabled individually, of course) and navigate with the Breakpoint Navigator.
Shortcut to breakpoints is Cmd + 8. Once there use arrow keys
File a bug report at http://bugreporter.apple.com if you feel something like this should be brought back.
Write below comment in your source file that you want bookmarked.
//<##>
And you can navigate to next / previous with: '^/' or '^?'
<##> means "placeholder of code snippet"
^/ means "jump to next placeholder"
^? means "jump to previous placeholder"
thanks
Another option, if anyone is still interested. The following directives will both produce a compiler warning that you can use as a bookmark:
#pragma message "<# message #>"
or
#warning <# message #>
If you want to place bookmarks using your mouse: create a code snippet with one of the 2 directives above. Drag & drop it to the line in your source file that you want bookmarked.
Navigate to next/previous with: Cmd-' and Cmd-Shift-'
In Xcode 4.4, if you leave a comment with this format:
// TODO: Your text here
it will be added as a listing in the jump bar alongside the list of methods in your current file, and then you can jump straight to that comment from that menu.
The simplest technique is to use a comment prepended by // TODO and then search, which allows you to jump through the issues from the navigator. Pretty hard to beat that technique.
I personally don't like using break points for bookmarks because it is not easy to enter notes. I use breakpoints as breakpoints, and prefer not to mix them up with bookmarks.
Anyhow, if you want to get a bit fancier you could get xcode to generate warnings // TODO: some message or // FIXME: some message that can be navigated in the issue navigator. I took the instructions below from this site:
Instructions
Head over to your project's item in the Project Navigator (usually at the very top)
Find your target in the list of targets on the left, select it
Head over to the "Build Phases" tab.
Click the "Add Build Phase" in the bottom right of this screen.
In the editor that appears insert the bash script shown below.
Now just build and you'll see all your //TODO: and //FIXME: comments have become warnings. I love this technique, it might not be right for everyone, but hope it helps someone.
Bash Script For "Run Script" Build Phase
KEYWORDS="TODO:|FIXME:|\?\?\?:|!!!:"
find "${SRCROOT}" ( -name ".h" -or -name ".m" ) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"
You'll also be able to click on each of the warnings in the issue navigator to go right to the file and point in your code where you left the original //TODO: or //FIXME:
Extra pro tip: Make sure you're using phrases to describe your //TODO: comments like //TODO: Handle this error gracefully, and things like that. The phrases will show up in the issues list beside each warning.
Credit for the little tidbit should go to "Tim" on the Cocos2D forums, (found after Googling for a bit), I believe his solution originally was intended for Xcode 3 and didn't work if you had spaces in your path name, my script here doesn't have those restrictions, still he should get full credit here's his original post.
Like npellow's answer to this question of mine, appCode by JetBrains has also made this possible. So, this may be another reason to use appCode instead of Xcode4, except that it won't be free later in time.
My method:
type in grammar error code in the previous line.....
After changing something in other place, I can go back to the previous place because the grammer error line will show a red line in the right side scroll bar. It indicate the place.
It is not elegant but unless there is a bookmark feature, this is the way i am using at the moment
You can install an Xcode plugin called "XBookmark".
This plugin provide features below :
Toggle Bookmark
Show Bookmarks
Next Bookmark
Previous Bookmark
How to install XBookmark:
Install Alcatraz.
Search XBookmark from Window->Package Manager and click Install.
Restart Xcode.
Now, you can see menus about bookmarks in the Edit Menu.
PS : This plugin is open source.

Resources