In Netbeans 6.9.1 (PHP bundle) the code format (ALT+SHIFT+F) doesn't seem to work on CSS files, that is when I try to run it nothing happens. Is it normal or am I missing something?
I've check it in my version of Neatbeans (Also 6.9.1) and it seems to work fine.
If it's not working for you, perhaps you need to check your Keymap settings.
To do so,
click Tools
Choose Options
Select the Keymap tab
Perform the Alt+Shift+F keymap in the "Search in shortcuts" input field
Make sure you get the following:
Actions = Format
Shortcut = Alt+Shift+F
Category = Source
Also check that your tabs and indents are setup in the Formatting tab under the Editor Section of the Options panel.
Hope that helps,
Tom
(tested with Netbeans 12.0)
You can use regular expressions to add newlines:
press Ctrl+H or click Menu Edit -> Replace...
Find What: "([{};])" (without quotes)
activate regular expressions (button with caption .* or Alt+G)
Replace With: "$1\n" (without quotes)
Replace All
Then you can use Alt+Shift+F to auto-indent
Related
Generally new to web design and watching some tutorials on creating some backend for a project, getting really tired of writing out the manually, I see youtubers do .classname and then the class with the div appears, but for some reason it isn't working for me? Any help would be appreciated.
Also, would it be easier to switch to Sublime, my buddies think that it is the way to go.
Cheers.
Go to settings
Go to emmet under the Extensions section.
Click on 'Edit in settings.json'.
Write the following inside the 'emmet.includeLanguages' tag. Otherwise, paste the whole statement.
"emmet.includeLanguages": { "javascript":"javascriptreact" }
Save the settings.json file.
Those videos are likely using emmet. VS Code includes built-in support for emmet completions in html files. For example, typing .classname in an html file will trigger an emmet suggestion that expands to <div class="classname"></div> when you accept it
If you do not see this working:
Make sure the document is in the html language mode
Try manually triggering suggestions after .classname using ctrl+space
Make sure you have not disabled Emmet
I tried everything written in the answers but it wouldnt work, I had to do the following;
go to settings in the bottom left, search for 'emmet'
scroll down to and tick:
'Trigger expansions on Tab'
then it works by typing .divClassName + Tab
Check out this Cheat Sheet for VSC:
Cheat sheet for VSC
Ensure that VScode recognises your file as HTML5 or CSS file. In my case I had emmet enabled, but while I could get emmet abbreviation in a CSS file, they wouldn't work in an HTML file. The issue was that I also had Django template extension installed and the file had Django template code as well, hence VScode considered the file as Django template file, not HTML. You can check this the status bar at the bottom of VScode. Once I changed the file from Django template to HTML by clicking on Django Template in the VScode status bar, emmet started working.
The above answers didn't help me because VS code already came with Emmet installed, but I was missing the information on how to actually trigger it.
For an html element
Type the element e.g. div, h1, whatever, then press tab to complete it
For a class
Type the class name beginning with a dot then press tab to complete it.
For example type .myclass and hit tab and you'll get <div class="myclass"></div>
Note: if your class has spaces, use a dot in place of the space (e.g. for "my great class", you should type ".my.great.class" and hit tab)
Source
This information is from here
Tried mentioned thing from emmet vs code document
go-to .vscode >> settings.json
add line "emmet.triggerExpansionOnTab": true
it worked for me for reference : Emmet in visual studio code
I came from vim. Its biggest win is commands like ci< when <this text is removed if cursor is placed inside angle brackets>
How can I do that in hackable editor for the XXI century?
You can do this using the vim-mode-plus plugin. It natively supports your example, and many other text-object style commands taken straight from Vim, e.g. all of these would work as well:
di<
da<
ca<
And it should work with ', ", (, and other delimiters, just like Vim.
There is a function that comes with the editor named bracket-matcher:select-inside-brackets that highlight everything inside the bracket (but not the bracket itself). You may then press backspace or delete button to remove the content, or any other button to replace the content. For windows, the default key combination is ctrl-alt-m.
If you are not using windows, or you may have accidentally overwritten the settings, you may open Setting > Keybindings and search bracket-matcher:select-inside-brackets. It should tell you what is the correct key combination.
Regardless of whether it were supposedly possible to customize this shortcut in the user preferences file (*) : is there actually a default shortcut for Replace/Replace-Next ? Following shows there is no hover-help on it:
(*) After many attempts I have never been successful for the keymap.cson to be respected by Atom. It just gets ignored. Thus I want to use whatever is the default binding for Replace[/-Next] .
No, there is no default shortcut for "Replace Next", only one for "Replace All" (ctrl+enter or ⌘+enter).
But there is a built-in command for it. Putting this in my keymap.cson file works for me:
'atom-text-editor':
'alt-cmd-e': 'find-and-replace:replace-next'
I found this example from here:
https://github.com/bronson/dotfiles/blob/master/.atom/keymap.cson
All of the default settings are here:
https://github.com/atom/find-and-replace/blob/master/keymaps/find-and-replace.cson
It sounds like you already know this, but just for reference, you can find your keymap.cson file by going to Settings (ctrl+, or ⌘+,), and clicking the "Open Config Folder" button.
If your keymap.cson is being ignored, I would start to diagnose the problem by commenting out everything except those two lines in order to see if another setting in keymap.cson is broken.
How can I set a shortcut in Atom editor for Go To Definition using go-plus. Thanks for your help in advance.
By default, the go-plus package uses Alt+Cmd+G to trigger the Go To Definition binding (as can be seen here). This binding will only work in files that use the Go grammar. Since Cmd is only available on Mac OS X, I don't know what keybinding other operating systems will use by default.
To redefine the keybinding, do the following:
Open the Atom Preferences, select the Keybindings section.
In the Search field, type 'go' to filter the list of keybindings.
Click the Copy icon next to the golang:godef keybinding.
Click the your keymap file link at the top.
This will open your keymap.cson file. Go to the end of the file and paste the copied content:
'atom-text-editor[data-grammar="source go"]:not(.mini)':
'alt-cmd-g': 'golang:godef'
Edit the keybinding to your liking and safe the file.
To verify the new keybinding, open the Key Binding Resolver view by selecting the Packages > Key Binding Resolver > Toggle menu entry. Open a Go file and press the keybinding you assigned, then watch the Key Binding Resolver view to see any conflicts.
What is the use of firebug's "Open With Editor" function?
I'd say it'll allow you to visualize a file / feed with an editor -- which means better searching features, syntax-highlighting, better-ability to copy code...
But it means you have to configure the editors, so firebug knows how to call one -- especially, so it knows how to pass it the data.
Edit after the comment : no, I don't see it allows you to see your modifications into the website -- but it's, I think, easier to go through the HTML code this way, with the editor you're using in your every-day life as a developer.
For example, you can check what's said in this article : Check Edit HTML Code with Firebug -- check the Editing With Firebug section.
And to use it, you have to :
select something like "Open with editor > Configure editors", and, in the dialog box, set the path to your editor
and, then, to edit some HTML page, select "Open with editor > name of your editor"
(The labels may not be exactly those : I'm using the french version...)
You can use cssUpdater to save your modified css directly after you have changed the property in FireBug -> http://www.cssUpdater.com