Xterm color codes for Vim on Linux
Vim uses Xterm color codes like 9, 1 and 114 on Linux. What’s the overall mapping from color to codes or codes to color?
Xterm color table:
You can also find the Xterm color codes here.
Vim uses Xterm color codes like 9, 1 and 114 on Linux. What’s the overall mapping from color to codes or codes to color?
Xterm color table:
You can also find the Xterm color codes here.
I ever discussed Starting KDE from Command Line by startx for KDE and GNOME. Recently, I installed MATE desktop on Fedora 17 and am very happy with it—dear, Gnome 2 is back. However, I checked the /etc/X11/xinit/Xclients script which is called by ‘startx’ and it only includes ‘startkde’ and ‘gnome-session’ without support to MATE. But…
I have many files under a directory. How to find those files under the directory that are larger than certain size, say 500MB? Find the files that are larger than 500MB in the current directory (./): find ./ -size +500M Prints our more information about these files: find ./ -size +500M -exec ls -lh {}…
How to remove newline characters from a string in C++? For example, a string like line 1 line 3 line 4 should be converted to line 1line 3line 4 Method 1: use `erase()` and `remove()` In short, use this code snippet: input.erase(std::remove(input.begin(), input.end(), ‘\n’), input.end()); std::remove() shifts all elements that are equal to the value…
The command systemctl enable rpcbind.service seems not work. The rpcbind.service does not start after rebooting. How to make/force the rpcbind.service auto start in systemd on Linux? You an force the rpcbind.service to start by making it be “wanted” by the target such as multi-user: # systemctl add-wants multi-user rpcbind.service This will force rpcbind.service to start….
Grub2: How to boot Fedora to an old kernel? The old kernel is a submenu under “Advanced options for Fedora”. It is not shown if I follow the instruction that # grep menuentry /boot/grub2/grub.cfg | cut -d “‘” -f2. The old kernel in grub2 is in a submenu entry in a menu. The key is…
For example, try to less the error messages generated by the compiler with make | less Use this command: make 2>&1 | less or, if you want stderr only: make 2>&1 >/dev/null | less Read more: How to judge whether its STDERR is redirected to a file in a Bash script on Linux? How to…