How to search up or down in x64dbg like in IDA Pro? - search

Lets say i want to search for sequence of byte "48 8D 0D" in x64dbg, the location is up above the current cursor.
In IDA Pro there is the option to do this IDA Pro options
Where is options like this(to search up or down relative to the current cursor) in x64dbg ? x64dbg options


Modify file sort by name in vim netrw plugin (old version) in Cygwin?

Due to security, tight control of user rights, and understaffed IT, I have very limited opportunities to upgrade my Cygwin installation. I am using netrw version v149 plugin for vim, which sorts files like so:**
I find this odd, since bash lists the files like so:**
In both cases, the sort is by file name, in ascending order. However, the netrw sort seems to treat the "+" character as preceding ".", while the reverse is true in the bash sort.
I find the latter to be much more useful, and wonder how it is that the plugin is using a different character precedence. Is there a simple and pain-free way to get the second sorting scheme in netrw v.149?
This can be done. Like open say the directory which contains these files in vim. Then:
Use the r key to set Reverse sorting order.
Then press the s key to sort using a particular style : by name, time or file size.
Hope this helps you somehow mate.
EDIT : If you want to persist say the reverse order and the particular style all the time, then add these to your vim config file :
let g:netrw_sort_by="time" "this chooses the style of sorting
let g:netrw_sort_direction="reverse" "this persists reverse sorting

How to display number of matches in incremental search?

I think ordinary editors can display the number of matches while searching strings like following. How to do this in Emacs? Especially I want to see these numbers while using isearch-forward and isearch-forward-regexp.
The 3rd party package anzu.el displays the current match and the total number of matches of the current incremental search in the mode line.
You can install from Marmalade or MELPA with M-x package-install RET anzu. Note that neither of these archives are enabled by default in Emacs, so you need to customize package-archives as explained in the instructions of the corresponding archive.

Using VIM to make acronyms?

I have a file with lot of full names like ....
Light Machine Gun
Statistical Analysis System
I want to capture the first character of every word in a line and want to make an acronym. For example Light Machine Gun would be LMG etc. I want to do it in VI editor record it as a macro and run it over the entire file.If anyone can help me that would be great? Thanks in advance.
Assuming one name per line and that the words are space separated, the following works:
%s/\(\w\)\w*\ */\1/g
If you also want to capitalize each letter, add an up-case flag (\u):
%s/\(\w\)\w* */\u\1/g
The "very magic" version (see :help /magic):
Vim can define acronyms, called abbreviations, say you want
Light Machine Gun Statistical Analysis System -> LMGSAS
Just enter:
:ab LMGSAS Light Machine Gun Statistical Analysis System
And whenever you type LMGSAS it will substitute it for you.
Use :ab to list out all abbreviations, una xxxxx to unabbreviate something. And finally abc clears everything.
Edit: I misunderstood your question, if your trying to go, words -> abbreviations, then the regex s/\(\w\)\w*\s*/\1/g suggested by Thor works fine.

Use xkbdmap (setxkbmap) to map rwin to altgr?

Normally, I can find solutions by just googling around, but I can't find any decent documentation for xkbdmap except for the grossly inadequate man page.
Perhaps I'm going about this the wrong way. I have a US 105 plain old keyboard that does not have an AltGR key. To the right of the space bar, I have Alt, Windows key, some sort of menu key, and then a Control key.
(what's the point of the Windows key and the Menu key - does anyone actually use those?)
Apparently, some keyboard have another key which is the AltGR key. That with E would give you a Euro symbol for instance, apparently.
Because my keyboard doesn't have this key, I thought to use the xkbdmap command like this:
xkbdmap altgr:rwin
Why does this not work?
There's no xkbdmap command in the standard xorg distribution. You probably can use xmodmap but generally things are done slightly differently in the X11 land nowadays. If you use XKB (everybody uses XKB now) then there are virtual modifiers such as "compose" and "meta" and "level 3 chooser" which are mapped to real keys. This is done with the setxkbmap command. You probably want either
setxkbmap -option -option compose:rwin
setxkbmap -option -option lv3:rwin_switch,eurosign:e
depending on what exactly you want. Google setxkbmap options to figure out your possibilities.
(The first empty -option argument clears existing options, the second one adds to existing options. If you want to keep existing options, skip the first -option. Current options are stored in the properties of the root window.)
Note that most keyboards that have AltGr lack the right Alt key. If you want your right Alt to act like AltGr, change rwin to ralt in the above commands.

VIM and custom tagging

I am using vim in windows to edit assembly code. It is a nonstandard language and disassembly of the binary is done by a custom script so I define the format myself. I would like to use tags to be able to jump through the code for subroutine calls. I have searched around quite a bit and all roads seem to lead to using ctags to generate a tags file, but obviously this won't work in my case as I am not dealing with C code. How is it possible to create a custom tag file? Here is an example of the code. First, each subroutine is defined by the keyword and the hex offset (the first column).
Subroutine e2b7
e2b7 2c c0 11 03 BBS [Branch if bits are '1'] #$03, $11c0, 00e2ce ($12)
e2bc a9 00 LDA [Load A with mem] #$00
. blah
. blah
. blah
And somewhere in the code a jump to the sub is executed;
d9ad 20 b7 e2 JSR $e2b7
Thanks for any help you can provide
Use ctags together with the taglist-plugin (
The source package of ctags contains the file EXTENDING.html which
describes how to define an extension. I did this for several languages.
Here two examples (make(1) and POD (perl old document)):
%%%%%%%%%% file '~/.ctags' %%%%%%%%%%%%%%%%%%%%
--regex-perl=/^=head2[[:space:]]*(.+)$/. \1/o,pod/
--regex-perl=/^=head3[[:space:]]*(.+)$/.. \1/o,pod/
--regex-perl=/^=head4[[:space:]]*(.+)$/... \1/o,pod/
--regex-make=/^([^:# \t]+)[ \t]*:($|[^=]+)/\1/t,targets/
To use this with taglist you need two additional lines in ~/.vimrc .
For the above examples:
%%%%%%%%%% file '~/.vimrc' %%%%%%%%%%%%%%%%%%%%
let tlist_perl_settings = 'perl;c:constants;f:formats;l:labels;p:packages;s:subroutines;d:subroutines;o:POD'
let tlist_make_settings = 'make;m:makros;t:targets'
This screenshot shows the taglist navigation window
with additional POD section.
ctags supports a lot of languages, including assembly -- if your favorite variant isn't included, perhaps you could add it in...?