background preloader

Why, oh WHY, do those #?@! nutheads use vi?

Why, oh WHY, do those #?@! nutheads use vi?
The VI Gang Sign by Jon Beltran de Heredia, May 16th, 2007 Yes, even if you can't believe it, there are a lot fans of the 30-years-old vi editor (or its more recent, just-15-years-old, best clone & great improvement, vim). No, they are not dinosaurs who don't want to catch up with the times - the community of vi users just keeps growing: myself, I only got started 2 years ago (after over 10 years of being a professional programmer). Yes, there are definite reasons why the vi/vim editing model is just superior to any other out there. Misconception #1: modal editing The first time you stumble into vi or vim, you are shocked and disgusted that you have to use 'i' to start typing text. Turns out, this is just a completely wrong way to use vi or vim. Let me explain the philosophy behind this. One good benefit of this is that the '.' command repeats the last complete, combined editing command (not movement commands). And now we come to insert commands. Example #1: the wonderful dot command

Vim anti-patterns | Arabesque The benefits of getting to grips with Vim are immense in terms of editing speed and maintaining your “flow” when you’re on a roll, whether writing code, poetry, or prose, but because the learning curve is so steep for a text editor, it’s very easy to retain habits from your time learning the editor that stick with you well into mastery. Because Vim makes you so fast and fluent, it’s especially hard to root these out because you might not even notice them, but it’s worth it. Here I’ll list some of the more common ones. Moving one line at a time If you have to move more than a couple of lines, moving one line at a time by holding down j or k is inefficient. { — Move to start of previous paragraph or code block.} — Move to end of next paragraph or code block.Ctrl+F — Move forward one screenful.Ctrl+B — Move backward one screenful. If you happen to know precisely where you want to go, navigating by searching is the way to go, searching forward with / and backward with ?. y/search<Enter> y? d2wi

Faster PHP Apps—Profile Your Code with Xdebug Object-oriented programming is well and truly in fashion, and PHP is no exception. So you’ve adopted the proper design patterns, built your site on the latest PHP framework, and have your database access abstracted so far that you’ve forgotten SQL. What’s Going On? When you first move towards object-oriented programming, the first thing you might notice is that you can give yourself a headache trying to follow the execution path through your code and the framework it’s built on. The next thing you might notice is that your site isn’t any faster – in fact perhaps it’s slower than it was. So we’ve got potentially slower code, and we can no longer just open up our simple PHP script and follow its execution from the top of the file to the bottom. Xdebug Xdebug 2 (currently beta – I’m running 2.0.0RC3) is an indispensable PHP extension which provides various ways of debugging and analysing your code on your development server. WinCacheGrind KCachegrind Less Grinding, More Caching More Xdebug

redtamarin - Google Code updating to latest tamarin-redux, repository will be unstable for whatever amount of time it will take to get this right Simply put, redtamarin is based on the Tamarin project (eg. the Flash Player Virtual Machine) and allow to run AS3 code on the command-line. But because Tamarin only support the AS3 builtins (Object, Array, etc.), redtamarin add numerous native functionalities, so you can test if your program run under Windows or Linux, or read/write files, or send data with sockets, etc. Put another way, if Adobe AIR allow you to build desktop executable with a GUI, redtamarin allow you to build desktop/server executable with a CLI. Mission Statement To support the use of the AS3 language for cross-platform command-line executable, as single exe either for the desktop or the server, as scripts for automation, as tools for the Flash Platform community. Want to help ? RedTamarin need your inputs Getting Started here good places to start Main | GettingStarted | FAQ News changelog misc

Vim: revisited I’ve had an off/on relationship with Vim for the past many years. Before, I never felt like we understood each other properly. I felt that the kind of programming I’m doing is not easily done without plugins and some essential settings in .vimrc, but fiddling with all the knobs and installing all the plugins that I thought I needed was a process that in the end stretched out from few hours to weeks, months even; and it the end it just caused frustration instead of making me a happier coder. Recently, I decided to give Vim another shot. Start with a basic setup – but not zero I learned this the hard way: you shouldn’t start with a huge .vimrc file that you copied from someone else nor should you install every single plugin that seems useful at that moment. This is a good starting point for your .vimrc: Everything mentioned in this article is valid in vim running in a terminal as well as graphical (GUI) vim such as gvim or MacVim. Guidelines for expanding your vim settings later on: ctags Ack

DeepaMehta -- Homepage Le PC aux 13 GPU Les chercheurs de l’Université d’Anvers viennent de mettre à jour leur configuration FASTRA pour inclure 13 GPU. Fastra On se souvient du premier Fastra, le PC à 4 000 € capable de rivaliser avec les supercalculateurs de 4 millions de dollars. A l’époque, il intégrait un AMD Phenom 9850, 8 Go de RAM, un disque dur de 750 Go et quatre GeForce 9800 GX2. Fastra II Les scientifiques ont néanmoins décidé de prendre d’assaut un nouveau problème, celui du rendu tomographique haute résolution d’une structure osseuse afin de faire avancer la recherche sur les maladies telles que l’ostéoporose. Néanmoins, le nombre important de cartes graphiques posent des problèmes. En ce qui concerne le reste de la configuration, les universitaires utilisent un Core i7 920, 6 x 2 Go de DDR3 1333 de marque Corsair, un disque dur Samsung 1 To, une alimentation Thermaltake Thoughpower 1 500 W et trois PowerExpress 450 W.

How I boosted my Vim » - Vimperator A few weeks ago, I felt inspired by articles from Jeff Kreeftmeijer and Armin Ronacher. I took some time to configure and fine-tune my Vim environment. A lot of new stuff made it into my .vimrc file and my .vim directory. This blog post is a summary describing what I’ve added and how I use it in my daily work. Before doing anything else, make sure you have the following line in your .vimrc file: " This must be first, because it changes other options as side effectset nocompatible Step 0: make the customization process easier ¶ Before starting configuring, it’s useful to install pathogen. So, download pathogen.vim, move it into the .vim/autoload directory (create it if necessary) and add the following lines to your .vimrc, to activate it: " Use pathogen to easily modify the runtime path to include all" plugins under the ~/.vim/bundle directorycall pathogen#helptags()call pathogen#runtime_append_all_bundles() " change the mapleader from \ to ,let mapleader="," Change Vim behaviour ¶ fun!

wiki: Scite Macro Expander SciTE Macro expansion facility I always enjoyed the C preprocessor macro facility. To my eye, this macro makes C code more readable and less error-prone: #define FOR(i,n) for(i = 0; i < (n); i++) Unfortunately, disciplined use of statement macros fell into disfavour due to abuse, and C++ stylists are generally against them (Stroustrup as usual takes a more pragmatic line) The SciTE Lua Macro expansion facility is a simple macro preprocessor which expands macros in the current buffer, rather like abbreviations. macro.subst.1=for(i,n)=for(i = 0; i < n; i++) and type FOR(k,10) in the buffer, followed by 'Expand Macro' (Alt+Enter). Since it's a single-pass expansion which never happens automatically, there's no problem in using keywords like 'for' here. Line feeds are indicated using '\n' in the macro definition and you can always use a backslash to split the definition over several lines. macro.subst.2=if(cond)=if(cond) { \n } else { \n } macro.subst.3=date=$eval( Setting up Examples where

Comment le Boeing 787 Dreamliner est devenu un cauchemar industriel - Au bout du compte - Blog Ségolène Royal peut-elle tenir les promesses de Hollande sur l’environnement ? Lui Président Ségolène Royal multiplie les déclarations sur le développement durable sans convaincre les écologistes. Berger (CFDT) critique Valls et met la pression sur le patronat Social Laurent Berger, secrétaire général de la CFDT, s'en est pris vivement, à plusieurs reprises, au patronat vendredi 18 avril lors d'une conférence de presse. Airbnb désormais estimé à 10 milliards de dollars Silicon 2.0 Le service de location entre particuliers a moins de sept ans d'existence, mais pèse déjà plus que des poids lourds de l’hôtellerie. Aquilino n’est pas un aigle Langue sauce piquante Joli prénom que celui du monsieur qui vient de se faire virer de l'Elysée, Aquilino. Cet insecte chez qui la femelle a un pénis et le mâle, un vagin Passeur de sciences Chez quatre espèces d'insectes cavernicoles brésiliens, la sélection naturelle a conduit à une spectaculaire inversion des sexes. Faut-il combattre les trolls ?

Vim Cheat Sheat for Programmers by Michael Pohoreski Update: Version 2.0 is up! There are now 4 versions to chose from: (If you are wondering what the differences are between the screen and print: the screen has less color variations, and no gradients to make it easier to read.) One designed for on-screen reading: PDF (Excel 2011 source),One designed for hard-copy reading: PDF (Excel 2011 source),One designed for monochrome printing: PDF (Excel 2011 source), andOne designed for Red/Green color bindness -- a "Blue" theme PDF (Excel 2011 source). The color coded Legend / Keys helps provide guidance for your experience level. Green = Essential Yellow = Basic Orange / Blue = Advanced Red = Expert If you don't like this version (I'd love to hear why) try these, you may find them more to your liking... Thanks to all the redditors for the feedback! The on-screen 150 DPI .png version is shown... The color hard-copy 300 DPI .png version: The monochrome hard-copy 300 DPI .png version: An color blind hard-copy 150 DPI .png version: === Vim Rants ===

An App A Day : Jedi Window Dock Theory of Constraints Bottom Line Increasing Profitability Through Increased Productivity Everyone understands the benefit of increasing production; we invest more money, buy more manpower, buy more machinery, and make even more money. Right? A more attractive alternative is to increase productivity. A 20% increase in the productivity of a typical manufacturing company with 30% raw material cost, 40% operating expense (all labor and all fixed expenses) and 30% profit will produce a 46½% increase in operating profit! A 20% increase in productivity results in a 46½% increase in profitability! Does that seem a little far-fetched? Let’s examine the popular alternative for raising profit – cost reduction. Now we have a choice, a 13% increase in profit due to a significant cost-cut, or a 46½% increase in profit due to a significant productivity gain. Of course if we chose the cost reduction way, we would have to be quite sure that our reduction didn’t actually harm some critical function of the system in some way. Summary

Best of VIM Tips, gVIM's Key Features zzapper Tips Home Vim Tips Blog (NEW) Cygwin VimTools Buy Vim Book Support VIM Submit to Social Websites