Skip to content
Advertisement

Tag: unix

auto-formating tool for django html template files

Is there a *nix tool (or vim plug-in) that would allow me to automatically format django html template files? Hitting the space bar hundreds of time does not sound like a good use of my time but then neither does leaving some weird formatting that is hard to read. Answer Install vim-jinja2-syntax plugin by putting Glench/Vim-Jinja2-Syntax when installing it with

Possible to combine glob sort w/ alternation in zsh?

Looking for a shell-only[1] way to take this list of dirs: And return it sorted numerically, with the subdirs showing up right after their parent: (*|*/bar)(n) is rejected as a bad pattern, while */{,bar}(n) expands to */(n) ~/bar(n) so the subdirs show up at the end. [1] I need this to be able to work on a wide variety of

Where is the official documentation for chmod?

I would have expected it to be here in the gnu documentation but it is not. So I Googled it and their were many links but I don’t know which one is the most “official”. For example the first hit is for an Ubuntu distribution, and the second is for a Mac OS X distribution. Answer On a typical Linux

How to make pipe run sequentially

Specs Don’t think this should make a difference but I’ll include it anyway GNU bash, version 3.2.51 Premise So say i have a pipe with multiple parts, how can I prevent part of the pipe running before the previous part is finished. Example In the below examples I will try to display the issue Output With sleep to show that

find and replace a String in vi editor on linux?

i am trying to replace String with new String in Linux vi editor but getting following error. Answer I’d guess the reason you’re getting that error message is because you intend to replace the string on all lines, not just the current one. In order to search all lines, add a % to your command:

Advertisement