How to Auto complete double quotation marks in notepad++ - autocomplete

Im am using TextFX plugin in Notepad++ and all xhtml and html autocomplete values are opened. Html tags are completing with no problem but i want to insert double "" (quotation marks ) in one button press but only one " mark is occuring. How can i fix this?

Notepad V6.5.5:
In the "Settings" Menu > "Preferences" > "Automatic conclusion".
Then you can choose what is duplicated when you type.
Example: { [ "" ] }
etc.

You can use a plugin called XBrackets Lite
http://sourceforge.net/projects/npp-plugins/files/XBrackets%20Lite/

Related

How do I remove Django HTML as an option in the VSCode Select Language Mode?

VSCode is still very new to me. Every time I open ah HTML document from my class assignments (or any ordinary HTML document for that matter) VSCode defaults to "Django HTML" over regular "HTML" formatting.
I'd like to remove Django HTML as the default so that any time I open up a .html document the default formatting is regular HTML.
First type CRTL + K, then press M
Click "Configure File Association '.html'..."
Type "HTML" into the search bar
Select "<HTML>"
If you do the same first 3 steps again, you should now see "<HTML> Current Default" which confirms that you have done these steps correctly.
Add this to your settings.json
"files.associations": {
"*.html": "html",
}

Keyboard Shortcut to Surround Selection with HTML Tag

Desired Steps:
Highlight (select) HTML/text, e.g. really
Press keyboard shortcut
Highlighted text becomes <b>really</b>
How to?
In a Javadoc comment you can just select the text which you want to wrap in a <b> tag and press CTRL+Space. Select the <b> template, press Enter and the selected text gets surrounded as expected. There are pre-defined templates for <b>, <code>, <i> and <pre>. You can define your own templates here: Java -> Editor -> Templates.
You're looking for Quick Fix/Quick Assist: Ctrl/Cmd+1. Then start typing the tag name.

Visual Studio Code not matching html tags

I am using visual studio code for writing html but it doesn't have the feature of identifying closing tag for the current selected one.
How can I achieve the same?
Here is how it looks on VS Code:
Can you suggest any extension or how can I achieve this?
VS Code 1.7.1
install this extension
highlight-matching-tag
and change the settings.json to
"highlight-matching-tag.leftStyle": {
"borderWidth": "0 0 0 3px",
"borderStyle": "dotted",
"borderColor": "red",
"borderRadius": "5px"
},
I think you chose PHP or something else for "language mode", change it on HTML
I'm not sure if you have any extensions installed that break the highlighting? If I use your example, it highlights the closing tag fine by default:
Additionally, there is a builtin Emmet command that jumps between the beginning/closing tag. In the command palette, you can search for 'Emmet: Go to Matching Pair".
If you bind it to a shortcut, you can press that for example twice to see the cursor jumping between your tag. The name of the command to bind is editor.emmet.action.matchingPair
I was having the same issue and HTML snippet extension solve it. Just install it Html snippet
and just do some changes in setting, goto file->preferences->setting,
you can now see User settings in the right hand side, add the following code
,"files.associations": {
// extension name : html
"*.php": "html",
"*.html": "html"
}
and you are ready to go. Enjoy :)
The best visual way that i found to do this is with a plugin highlight-matching-tag
"highlight-matching-tag.styles": {
"opening": {
"full": {
"highlight": "rgba(165, 153, 233, 0.3)"
}
}
}
VSCode now supports matching tag highlighting by default:
Install "Bracket Pair Colorizer" extension.
File -> Preference -> Settings -> User Settings(Text Editor). You can edit in json view.
first confirm your visual studio have this extension it install default but for safe side you can check and solve highlight problem with matched div with this steps:
Go to the visual studio and type Ctrl+P
Make sure
Open preferences > setting
Paste this:
"editor.occurrencesHighlight": false,
"highlight-matching-tag.styles": {
"opening": {
"name": {
"underline": "red"
}
}
}
first line for disabled highlights.
you can choose color : red or anything else
may be it's help to you
#thank you
I was having this issue too. If you click and drag it selects all words with that text highlighted, but if you just single click it seems to select the closing tag. So yeah just single click a tag to get the pair, don't double click or click and drag.
I was having this same issue with Some Tags matching and highlighting while others don't.
The Weird thing was if I created a new file, and put a bunch of tags in they all highlighted correctly.
Turns out that that the person that created the original page used </br> for line breaks. This broke the highlighting of open and closing tags where a </br> happened between them. I changed the </br> to <br /> and everything is happy now.
It also happened with <link></link>, that I fixed by removing the closing tag.
I would suggest that if you are having this issue to look for closing tags that are not needed/ required.

How can I get Eclipse to auto-indent code blocks within if and for statements?

I tried to get Eclipse to convert all of the tabs in my project to spaces like this:
Java Editor:
Click Window » Preferences
Expand Java » Code Style
Click Formatter
Click the Edit button
Click the Indentation tab
Under General Settings, set Tab policy to: Spaces only
Click OK ad nauseum to apply the changes.
And now my code is formatted without any indentations within if and for blocks, like this:
private void addAppointment(Resource resource) {
if (resource != null) {
Appt appt1 = new Appt();
appt1.setTime(new Date());
resource.setAppointment(appt1);
}
}
I really don't want to have to manually fix this in the hundreds of files in the project, how can I format to indent within if and for blocks in the whole project?
I should also say that the "Statements within blocks" checkbox in the active Formatter profile is checked. The preview it shows has a for block with an indented body, so I have no idea why that isn't being applied to my project.
#gnac provides some good options, in addition to:
Similarly you can use ctrl+shift+f (Source->Format) on each class to format it on the fly
You can select the project(s) and do Source menu -> Format to format everything in that project in one go. (No keyboard shortcut for it AFAIK.)
So once you set your formatting options you have a couple of options. You can set the preferences to format your files when saving.
Preferences->Java->Editor->Save Actions
However, if you have a lot of files this will be a pain as well. Similarly you can use ctrl+shift+f (Source->Format) on each class to format it on the fly, again having to do it on each file individually.
Inside Eclipse you can use Search->Find, enter "\t" in the text box and select the "Regular Expression" check box and then click the "Replace..." button. When the search is done, it will ask you what to replace it with. Enter 4 spaces into the "With" text field. Click Preview to see what it will do, or OK to make the changes.
I would use a find and sed to find all of the java files in a directory and replace the tabs, although this is outside of eclipse
find -iname ".java" -exec sed -i.orig 's/\t/ /g' {} +
If you're not on Linux you could use cygwin to do the same on Windows.

How can I make Aptana/Eclipse replace selected text with quotes?

When selecting a portion of text in Aptana Studio (I assume the same is true for Eclipse in general) like so:
And then typing a single quotation mark ("), it will result in this:
But what I want is this:
Or even better:
Please note, I really like automatic closing of parenthesis/quotation marks/braces/..., I just want to affect the behavior when text is selected.
In Aptana Studio 3:
Window > Preferences > Aptana Studio > Editors > Disable "Wrap selected text with matching characters"
This helped me find the solution: https://aptanastudio.tenderapp.com/discussions/questions/1122-disable-automatically-closing-quotes