Posts

A collection of 67 articles

CSS Line Wrap Indicator

Many editor can wrap a line that reaches the window width and show an indicator in the margin, for example, Emacs. Emacs line wrap with bent arrow in fringe I want to add such line wrap indicators to the code block in HTML. It is easy to add indicators as background image in CSS. But the indicators should only be shown when the line is wrapped. And from the figure, the wrap indicator is not displayed on the last line in the right margin, and not on the first line in the left margin. There’s a :first-line pseudo element selector, there’s no :last-line. However, it can be achieved by using :before and :after with position trick. You can check the result in this jsfiddle. Resize the result panel to see the line wrap indicators. Following is a detailed explanation.

Updated  •  3 min read

[Outdated] Tmux And Rvmrc

RVM has since moved to using .profile, so just put the “cd .” in .profile and it will work — Mikael Wikman commented below Original Article Tmux is a terminal multiplexer. I switched to Tmux from GNU Screen recently. I work on several Ruby projects. I use RVM to manage gem set for different projects, and use rvmrc file to switch gem set automatically. I usually start a Tmux session for a project in its root directory, so all the windows and panes in the session use the project root as default directory. The problem is, the new created shell in the session does not load .rvmrc in the root directory. I have to force loading the file using “cd .”…

Updated  •  2 min read

Mendeley: Cross Platform Research Management Tool

Mendeley is a research management tool for desktop & web. It has clients for Linux, Mac, Windows and iPhone and a Web interface. Mendeley can manage any document, but is better to work with PDF. The file meta data are synchronized though Mendeley server. The attached files (PDF or any other formats) can also be synchronized, but the free account has a quota of 500MB. However, the attached files directory and underlying sqlite database can be synchronized manually.

Updated  •  3 min read