background preloader

Vim

Facebook Twitter

How I boosted my Vim » nvie.com. 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!

VIM and Python - a match made in heaven. It has come to my attention that somebody ‘round these parts has been preaching the gospel of Sublime Text 3. Well, as the resident senior developer (err, old fogey), I feel it’s my duty to provide a counterexample by way of the only TRUE Python development environment you will ever need – and that environment is of course VIM. That’s right. VIM is ubiquitous, fast, and never crashes. And it can do just about anything! On the down side though, VIM can be a pain to configure, but fear not – This article will show you how to get a powerful VIM environment setup, geared towards wrangling Python day in and day out.

To get the most out of this article you should have at least a basic understanding on how to use VIM and its command modes. Installing Since VIM comes pre-installed on a number of *nix systems, let’s first and foremost check to see if it’s installed: If installed, you should see something like: At this point, you want to look for two things- The VIM version. Windows VIM Extensions. Software installation - How can I install and use powerline plugin?

Vim-R-plugin. Jakson Alves de Aquino José Cláudio Faria This plugin improves Vim's support to edit R code. Download the plugin: If you use Debian or a Debian based Linux distribution (Ubuntu or other), you may want to install the vim-r-plugin_1.1-1_all.deb package. Vim-addons remove r-plugin vim-addons install r-plugin Notes: The Debian package of the plugin works with the Debian package of Vim. Please, read the plugin's documentation for details on usage. Sample vimrc: Videos on youtube: Screenshots: The plugin running in a terminal emulator, using the screen.vim plugin and the Tmux application to split the terminal in two regions separated by a green line. The Vim window was split in two. Now, the the object browser shows the objects that are in R's workspace: R documentation for the function attr() is shown in a separate tab: Syntax highlight of R code.

In this screenshot, we can also see the use of the ShowMarks plugin to highlight marks. Szw/vim-ctrlspace · GitHub. Everything I Missed in "Vim After 11 Years" - Ian Langworth's Things of Variable Interest. Ap/vim-css-color. Switching to Vundle - Code7 Interactive. I’ve been using Vim on and off for close to 10 years now and It became my primary editor when I switched from TextMate to MacVim a few years ago. (Along with a lot of other people in the Ruby community) I started using the Janus distribution and never had any major issues with it. There have been a few minor performance issues though, issues that mostly stem from the large number of plugins and customizations that Janus brings to the table. I have decided to start over, this time being slightly more restrictive with my configuration.

I’ve also decided to use Vundle for plugin management… Vundle is short for Vim bundle and is a Vim plugin manager. Starting position There is no point in making any changes until you have figured out what the current state is. In my case that would be: mvim -v --startuptime /dev/stdout +qall Which prints 171 lines of log output for Vi-mode and 189 for the GUI-mode. You might want to take a look at Improving Vim’s Startup Time over at Usevim. Extra plugins Vundle. Airblade/vim-gitgutter. Chrisbra/csv.vim · GitHub. Bling/vim-airline. Powerline/powerline · GitHub. Gmarik/Vundle.vim. O instalar Plugins no Vim » Pinceladas da Web - Aprenda HTML5, CSS3, Javascript e mais. Basicamente temos duas opções para instalar plugins no Vim: Mover os arquivos do plugin para pastas especificas Como se tornou um costume criar repositórios remotos para os plugins do Vim no GitHub, se optar por mover os arquivos do plugin, considere que vai ser bem trabalhoso manter seus plugins atualizados. Para cada plugin que instalar ou atualizar, vai precisar clonar o repositório e depois mover os arquivos do plugin, conforme exemplo abaixo: Utilizar o Pathogen.vim A segunda opção é um plugin do Vim, o Pathogen.vim.

Foi criado para sanar o problema de instalação e atualização dos plugins, removendo a necessidade de mover os arquivos do plugin para suas respectivas pastas. Sendo assim, você só precisa clonar o plugin para instalar, e para atualizar basta um dentro da pasta do plugin. Agora vamos realizar as duas opções de instalação citadas acima na prática. Instalando Pathogen.vim Para instalar o Pathogen.vim, basta executar o comando abaixo no terminal: Obs.

Execute pathogen#infect() Vim, switching between files rapidly. Vim Splits - Move Faster and More Naturally. Most of us are Vim users and have tweaked our favorite editor for speed and convenience. See thoughtbot’s dotfiles. One of my favorite tools is the window split. Here is a quick splits overview and configurations to use them more effectively. Photo credit: Andrew Ressa on Flickr The basics Create a vertical split using :vsp and horizontal with :sp. By default, they duplicate the current buffer. :vsp ~/.vimrc You can specify the new split height by prefixing with a number: :10sp ~/.zshrc Close the split like you would close vim: :q Easier split navigations We can use different key mappings for easy navigation between splits to save a keystroke. Nnoremap <C-J><C-W><C-J> nnoremap <C-K><C-W><C-K> nnoremap <C-L><C-W><C-L> nnoremap <C-H><C-W><C-H> More natural split opening Open new split panes to right and bottom, which feels more natural than Vim’s default: set splitbelow set splitright Resizing splits Vim’s defaults are useful for changing split shapes: More split manipulation :help!

What’s next? 15 dicas para maior produtividade usando o GVim | Gustavo Dutra. Setting Up and Using Vim for Python / Django Development | Bixly's Blog. There are a lot of text editors and IDEs for a popular language such as Python, and we’ve already featured Eclipse/PyDev before. Today, we’ll focus on Vim, a highly configurable text editor built to enable efficient text editing. From the Vim website: Vim is often called a “programmer’s editor,” and so useful for programming that many consider it an entire IDE. It’s not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files. We’ll go through the installation and Python/Django-specific configuration through different levels, and depending on where you stop, you’ll get either a simple text editor, a full-blown IDE, or something in between.

Assuming you are using Ubuntu: sudo apt-get install vim For other operating systems: Once you’re done, running vim with a file will show something like this: Most of our configuration will happen on your vimrc file. The basics would be: Seven reasons why you should switch to Vim. By : Javed Khan So you want a better IDE for developing django, huh? Why not give good old vim a try? Use pathogen to maintain your vim plugins (and sanity). Using this, you can clone the repositories listed here to .vim/bundle/ and start using them right away. Also, consider adding your .vimrc and .vim to a repository.

My vim files can be found here. 1. Starting from vim 7.1, syntax highlight for django templates works out of the box. If you are on an older version, use this plugin 2. SnipMate provides commonly used "snippets". Django specific snippets can be found at robhudson's repository Its very easy to write custom snippets in case you need them. 3. This one is not django specific, but it can save a lot of time spent debugging typos or silly mistakes. PyFlakes detects errors in your python code and highlights the offending lines so you can easily rectify them. 4. Fugitive is a git plugin for vim. This one integrates seamlessly with my workflow. 5. 6. 7. Sparkup allows you write zen code.

Tpope/vim-fugitive. Goodbye, Zen Coding. Hello, Emmet! Advertisement Back in 2009, Sergey Chikuyonok wrote an article1 to present a new way of writing HTML and CSS code. This revolutionary plugin, called Zen Coding, has helped many developers through the years and has now reached a new level. Emmet2, previously known as Zen Coding, is the most productive and time-saving text-editor plugin you will ever see. By instantly expanding simple abbreviations into complex code snippets, Emmet can turn you into a more productive developer. For those who prefer to watch instead of read, here is a summary of my favorite tricks. How Does It Work? Let’s face it: writing HTML code takes time, with all of those tags, attributes, quotes, braces, etc. HTML Abbreviations Initializers Getting started with a new HTML document takes less than a second now.

Html:5 or ! Easily Add Classes, IDs, Text and Attributes Because Emmet’s syntax for describing elements is similar to CSS selectors, getting used to it is very easy. Also, you can combine classes and IDs. Nesting.