I can't seem to find a package plugin or setting for highlighting matching LINES in Sublimetext 2.2? If you highlight a single word it will circle all the other matching words, but I need that for the entire line. See the attached image from EditPlus, that's what I need. You guys know of anything like this? Thanks!
After selecting the line of interest, ctrl+d will select the next instance of the line.
If you wantto select all matching lines, use ctrl+super+g (if on OSX, I think its alt+f3 on windows).
No additional package is needed to find matching lines.
Related
I'm not a big fan of the command line readline keyboard shortcuts so I'm hoping to remap C-Right/C-Left to navigate one word back/forward and C-BS and C-Del to delete one word back/forward. However, after reading the documentation and forumns, I'm not able to figure out how to do this.
Currently, when C-left/C-right are typed in the command line, the cursor doesn't move and instead keycodes are inserted (C-left = [1;5D, C-right = [1;5C). I've tried many remappings but the mappings that I would think would work best for this are:
cmap <C-right> <A-f>
cmap <C-left> <A-b>
I was able to figure out how to delete one word back using the following mappings (on further review there is documentation in the VIFM manual regarding mapping BS):
cnoremap <BS> <C-w>
cnoremap <C-h> <C-w>
However, I'm still uncertain on how to map delete one word forward using C-Del. When I use the following remapping for C-Del, the result is that one character to the left of the cursor is deleted. Note, when I use other C-* combinations for delete word forward the remappings actually works making me think that it may not be possible to remap C-Del:
cmap <C-Del> <A-d>
I'm using VIFM version 0.12 on Arch Linux. Any suggestions?
List of keys that are supported by angle-bracket notation is available in the documentation. And combinations of Ctrl with arrow keys are not there.
See this GitHub issue for a discussion of why and an example of how to work around it:
" ctrl-right
cnoremap <esc>[1;5C <a-f>
" ctrl-left
cnoremap <esc>[1;5D <a-b>
" ctrl-del
cnoremap <esc>[3;5~ <a-d>
At this point I'm still not sure that these sequences are common enough among different terminal types to be hard-coded and not cause trouble.
Amazing people!!
I have a project which needs a TechDebt to be executed where, all the existing code files having 2 space indentation. Now I want to convert all the 2 space indentation to 4 space indentation, is there any way I can automate this process rather going with Manual approach.
Potentially with any sort of Shel scripting in XCode editor configuration settings where I can inject that script and get things done.
Help would be highly appreciated.
Thanks a ton in advance guys.
I think you should be able to do what you're after using Regex in Xcode Find and Replace. Using ⌥⇧⌘F to bring up the Find Navigator, checking Replace is shown. Switch from Text to Regular Expression if not already shown and ensure In Workspace is selected (or change to required scope)
Use ^\s\s for Find and ^\s\s\s\s for Replace. This will replace all 2 space indentation from the start of each line to 4 space indentation.
Leon's answer is close... but that will also change existing 4-leading-spaces to 6, 3-leading to 5, 6-leading to 8, etc...
Try search pattern:
^ [\S]
hard to tell here, but that is ^ followed by two spaces followed by [\S] (beginning of line + two spaces followed by non-whitespace),
replace pattern:
$0
hard to tell here, but that is two spaces + $0 (the matched string)
Hey Guys #DonMag and #Leon Storey
I did a bit research and I found a significant solution which is below :
Install SwiftLint brew install swiftlint
Go to your project in terminal
Execute below command
swiftlint autocorrect --format
There you are!
This will edit all your files automatically and convert them into 4 spacing and also it will fix other formatting errors inside your project if any. For me it was 790 files which got executed just in seconds.
Thanks for the answers guys.
I am using Atom to find and replace certain letters in different lines in a file.
However, I am not able to select different lines and then apply the only in selection method.
I used cmd to select the lines I want to replace the letters in.
Thanks for any help!
The doxygen graph for "includes" and "is included by" are created with nesting depth increasing from top to bottom (using 1.8.5).
Since we have mostly shallow graphs with many nodes, this leads to very wide graphs with ugly horizontal scroll bars. Is there a way to teach doxygen to create these graphs in a left-to-right orientation, the way it creates caller/call graphs?
I know that graphviz/dot supports this, but can't find a way to tell doxygen my preference.
There is a similar question asked recently which I am duplicate answering:
Doxygen: Is it possible to control the orientation of dependency graphs?
After looking for the same myself and finding nothing, the best I can offer is a hack using the graph attribute rankdir.
Step 1) Make sure Doxygen keeps the dot files. Put DOT_CLEANUP=NO in your confige file.
Step 2) find your dot files that Doxygen generated. Should be in the form *__incl.dot. for steps below I will refer to this file as <source>.dot
Step 3a) Assuming the dot file did not explicitly specify rankdir (usually it is TB" by default), regenerate the output with this command.
dot -Grankdir="LR" -Tpng -o<source>.png -Tcmapx -o<source>.map <source>.dot
Step 3b) If for some reason rankdir is specified in the dot file, go into the file and add the rankdir="LR" (by default they are rankdir is set to "TB").
digraph "AppMain"
{
rankdir="LR";
...
Then regenerate the output with:
dot -Tpng -o<source>.png -Tcmapx -o<source>.map <source>.dot
You need to redo this after every run of Doxygen. A batch file might be handy, especially if you want to process all files. For step 3b, batch replacing text is outside of the scope of this answer :). But here seems to be a good answer:
How can you find and replace text in a file using the Windows command-line environment?
I'm currently using the LaTeX listings package to display a block of code, and a diff of the file against a previous version.
Both blocks are coloured by listings as if they are code (which they are) but I would like to colour the diff similarly to emacs diff-mode - red for lines matching ^-, green for ^\+ etc.
Does anyone know if there is a package to achieve this, whether listings can do it, or whether it is possible to write a LaTeX command to do it? (or rather - where a good source of information on the latter can be found?)
Thanks,
Hud
If you just want unadorned diffs, Pygments supports them, so texments (a latex front-end for pygments) does what you want.
But I guess that what you want is to have diff's coloured, while having the syntax of the underlying code highlighted appropriately. This you can't do properly the usual way, in general, because syntax highlighting may depend on the state from the previous line, and with udiffs the previous line may be missing, or an inserted line might follow a deleted line, &c.
To do the right thing, you'd need to syntax highlight the old and new versions, and then scramble the highlighted versions together to get the right output. Quite a bit of work, and I've not heard of anyone who's done that.
You could also try simply modifying the usual syntax highlighter for a language, removing highlighting rules that involve multiline state, and inserting rules to colour lines with udiff markup. Cf. Pygments' Write your own lexer; what you want from diff is trickier, since you want what is coloured to be highlighted, so you can't just make the lines into GenericTokens; I don't know what the right way to do this is.
Use a scripting tool such as sed, awk, Python [lang of choice]to produce the Latex source code.