About me I started to write my own How To's not to show the world what a geek I am but to help myself after a system reset or for faster configuring a new machine :-)
Short introduction to vim vi is the part of almost every unix-system (as far as I know) - but what's so special on it? I like the vi, even without the add-ons and plug-ins and all the fancy stuff. It's quite comfortable to use, for example your fingers don't have to leave the main-keys for scrolling up and down, you can do it with the h-j-k-l-keys. Why? Ha, because the vi has different modes (visual, editing, command). So you need less short cuts than on other editors. But I like it because I grew up 'in a terminal world'. Even now I don't like working on a graphical surface that much, I'm still using centerim, mutt, w3m and vi(m) :-). So let me tell you how to use this powerful tool. You can make it even more powerful by installing add-ons (e.g. from www.vim.org).
Use vim as HTML-Editor vim is my favourite editor for almost everything. I write all my code, mails, letters... with it :-) Here I want to show you how to improve your vim (so it turns into a vim+ hahaha) for html. Just a few steps and you've a high quality html-editor on your machine, look at this screenshot first, we need to get some stuff:
Now you can try your new html-editor: $ vi test.html type doctype, followed by pressing tab, next line: type html and tab etc. :-) Make a screenshot without x Something's wrong with your X-server or you are working on a machine without X installed but you want to make a screenshot? No problem, just type
change enconding of a text file To change a text file e.g. from utf-8 to ISO 8859-1 you can use the powerful conv-command:
convert a mp3 to a wav Sometimes you need a wav-file, for example to test your device is working or not. You can use mpg123 :-)
Short introduction in gnuplut gnuplot is a very powerful data-analyzing-tool. It can be used for almost every kind of plots. Here's a small list of things I always forget... First you need any input data, for example a simple textfile. gnuplot is happy with a column vector, BUT you have to include the x-variables, also! For example:
etc. After calling gnuplot you can plot this file with
> plot "file"
If you want to plot to or more vectors on the same graph you just have to append the second filename, like
> plot "file1" "file2"
To discern the different types of plotted vectors you might want to use a different plotting style. This is possible with
> plot "file" with STYLE
where STYLE stands for lines, dots, linespoints, points, errorbars and impulsesTo label the axis and donate a title of the graph you can add
> set xlabel "string" > set ylabel "string" > set title "string" Okay, now you've a great plot on your screen, but how to get a printout? No problem, just set the terminal
> set terminal TERMINAL
where TERMINAL stands for jpeg, fig, x11, postscript or even latexto set a filename for the plot just type
> set output "outfile.jpg"
More information get with the very detailed help-function of gnuplot. Just type e.g.
> help terminal
and you'll see all possible options. A very useful page can be found here:GNUplot - not so frequently asked questions Replace a string in a textfile sometimes you need to replace a general string in very large text-file. I want to show you two ways to solve this problem: with vi it's very easy doing it with vi:
the second way is the way I prefer: using sed
|