The goal is to use a hidden Vim instance to accurately manipulate a Sublime Text buffer as though you were editing the text directly in Vim. This has been accomplished.
It’s not simply a terminal emulator embedded in a text editor. Sublime is still in control of the text buffer. You will be able to use the entire native Sublime interface while in INSERT mode, including plugins.
IMNSHO, all Vim emulators suck. This freak of a project will surely make you feel you’re at home. Heck, you can use your complete Vim setup with this.
The only downside is (you saw this coming :twisted:), it does not work on Windows. On Linux or OS X you can simply use Vim itself, but the Windows version is ugly and Sublime is the best alternative out there. Perhaps I’m asking for too much. 😐
Anywho, this is wonderful news for Linux/OS X Sublime Text users out there.
The good old less command can be used to open more than plain text files. All you need is to set the LESSPIPE environment variable to pipe the /usr/bin/lesspipe script in your .bashrc or .zshrc file. In most systems, the lesspipe script is pre-installed. Otherwise you can download it from here.
export LESSOPEN='|/usr/bin/lesspipe %s'
Now simply open your pdf files with less.
less abc.pdf
Besides from pdf files you can pipe in compressed files (like tar.gz, zip, rar, etc), ISO files and even .doc files. But who uses .doc files anyway?
I made a small countdown script for the shell. It goes as follows:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -ne "blah blah \r" was used to write in the same line over and over
That 19800 is the time difference from GMT 0.0 in seconds. In Sri Lanka, it’s 5.30 hrs. Yes, we’re dealing with epoch time here, but still trying to figure out why we need to offset the time difference. 😕
--partial – this lets rsync know that it should keep the already downloaded partial files and download only the remainder --progress – show the progress of the transfer --rsh=ssh – use the ssh protocol user@ip – remote machine. This might be the alias you’ve given it in your ssh config file. remotepath – path to the file in the remote machine localpath – path to the partially-downloaded local file
ShellCheck is a static analysis and linting tool for sh/bash scripts. It’s mainly focused on handling typical beginner and intermediate level syntax errors and pitfalls where the shell just gives a cryptic error message or strange behavior, but it also reports on a few more advanced issues where corner cases can cause delayed failures.
Interestingly, the tool’s completely written with Haskell. You can copy/paste the script on the site, or even install it so you can conveniently check shell scripts every now and then. You need cabal to have installed to compile the source. On Debian, you can install the package haskell-platform to install cabal.
z is a command-line tool that would make jumping around your favorite directories much, much faster. It sits in the background and monitors where you cd to often, like a creep. 😯 And whenever you need to change to that ~/pictures/lol/cats directory, all you have to type in is z cats and you’ll be there. How it achieves this feat is by overriding the default cd‘s functionality with a custom shell function. Bad, bad z. 😈
Install rupa/z somewhere in your $PATH, say ~/bin.
cd ~/bin
curl -O https://raw.githubusercontent.com/rupa/z/master/z.sh
chmod +x z.sh
source z.sh
You might get a ‘no such file or directory’ error the first time, just ignore that. z works in both bash and zsh. You might need to add the source ~/bin/z.sh line in your .bashrc or .zshrc so it starts up with your shell session.
Update:
Optionally, you can install the z man page as well. Jump to a directory in your MANPATH (you can find these using the command man -w) and download the man file.
cd /usr/local/man/man1
sudo curl -O https://raw.githubusercontent.com/rupa/z/master/z.1
This is old, but randomly came across this TeX FAQ which explains why the version numbering of TeX is reaching pi:
Knuth has declared that he will do no further development of TeX; he will continue to fix any bugs that are reported to him (though bugs are rare). This decision was made soon after TeX version 3.0 was released; at each bug-fix release the version number acquires one more digit, so that it tends to the limit π (at the time of writing, Knuth’s latest release is version 3.1415926). Knuth wants TeX to be frozen at version π when he dies; thereafter, no further changes may be made to Knuth’s source. (A similar rule is applied to Metafont; its version number tends to the limit e, and currently stands at 2.718281.)
Reaching π isn’t as easy as it sounds though. So many iterations and still you won’t be there. You can’t achieve perfection.