How to highlight one exact line in visual studio 2012? - visual-studio-2012

I want to have, for example, line 133 always be highlighted as blue (for example). Is there is a way to do so?

You can add a special comment to this line and use an extension like CommentsPlus to display it with color.

Related

How to retrieve the current mode color highlight used in the status line?

I'm working on adding an automatic highlight for my current line in Vim, that matches the current mode color used in the status line. So far I haven't had much success if finding a way to get what that current color is.
The colors for the status line are being set based on the current theme, so I'd rather set my current line color dynamically rather than hard coding it.
For example, a few of my mode colors are:
Normal = Blue
Insert = Green
Visual = Red
I'd like to be able to retrieve the exact color codes used for those highlights from the current theme, so that I can set up a few simple autocommands to use them for mode switches.
Is there a way to easily retrieve these colors?
You can query the colors and attributes of a highlight group via synIDattr(); you can find an example at :help hlID().
If you intend to use the cursorline feature and have a single-colored statusline that gets its StatusLine highlight group changed dynamically by autocmds, simply linking both (:hi link CursorLine StatusLine) might already work.
PS: I personally would find it highlight confusing if the same colored line could either represent the current line or one of the horizontal separators between windows, but your mileage obviously varies...

vim: highlight words in visual block mode

Below is a screenshot of me entering visual block mode and pressing "w" to select by word:
How can I select every word in the rows I have selected? Meaning I want the full word in the rows highlighted instead of it getting cut off as shown in the screenshot.
edit: What I want to be able to do is delete a column of words of varying length. In the example screenshot I want to delete the words between the tags, But it could be any column of words.
There are a bunch of plugins for multiple selection, look them up on vim.org.
But I must remind you that visually selecting text is more often than not an unnecessary step. Why don't you explain what you actually want to achieve instead of your failed attempts? Maybe there's a better way...
[edit]
:'<,'>norm dit
seems to be the simplest way to achieve your goal without selecting every word:
and :,+7norm dit would be even better because you don't select anything.
The highlight modes can only select blocks (by cursor, by line, or by rectangular block). You can use a plugin such as vim-multiple-cursors to do what you are trying to do.
The only place where Vim allows a non-rectangular, "jagged edge" visual selection is at the end of the lines, i.e. by extending the blockwise selection with $. Therefore, you'd need to (temporarily) get rid of the trailing </th> (or include it in the selection, but operate in such a way that they are kept intact).
You shouldn't need a selection to work with the text. For example, to delete the text inside the tags, you can use a substitution:
:%s#<th>\zs.*\ze</th>##
You can't. You can only select rectangular blocks in block select mode. Maybe a plugin solves this?

vim: Change the behavior of visual block mode to force highlighting of columns

I am new to vim and this was difficult for me to google because I am not sure how to articulate what I want to do.
Using this screenshot as a reference:
I want to highlight the following block of text:
Is there a way to force vim to highlight an arbitrary block of text like this?
I can highlight text in the square from line 8 to line 11, but when I move down to the closing bracket it just highlights a single column.
From here:
If I move down one row it only selects the text in the first screenshot.
You can use -- VISUAL BLOCK -- mode (by default you enter this mode with Ctrl+v). Start on the column you want to start on. Enter the mode and move to end of the longest line (with $ if you wish). This will highlight the entire line for other blocks as you continue to move up.

Vim's visual mode guidance

When in Vim's visual mode (regular or line), what can you do?
Is it simply for selected part of a line, an entire line, or a block of text?
And then you either copy/past/search/replace on the selected text or are there more tricks to it?
Yes you are correct. Visual Mode is generally used for moving/searching/copying/deleting blocks of text.
However some tricks you can do is pass that block of text to external programs, such as sort.
Assuming you have selected text with visual mode, you can call(for example):
!sort
This will pass the highlighted text, and pass that text to the sort unix command(because of the '!'). Once it sorts the text, it will then replace what you originally highlighted in visual mode with the sorted text.
I often select a column with visual block and insert text for each line of at the selection (with I for before the selection or A for after).

Change active line color in Dreamweaver

Is there any way to change the active line in Dreamweaver to something? Like yellow such as most text editors support. I've searched the preferences and don't seem to see it. Would make it much easier to see which line I'm currently on.
In Dreamweaver CS4, you can click on the line number to the left of the text and it will highlight the line. As soon as press an up or down arrow key or click on another part of the text, the highlight goes away. I think that's about as close as you're going to get. They probably don't offer a constant highlight because it would interfere with the code coloring.

Resources