{"id":910,"date":"2009-06-07T17:44:03","date_gmt":"2009-06-07T15:44:03","guid":{"rendered":"http:\/\/www.marblestation.com\/?p=910"},"modified":"2012-06-25T13:52:31","modified_gmt":"2012-06-25T11:52:31","slug":"vim-referencia-rapida","status":"publish","type":"post","link":"https:\/\/www.marblestation.com\/?p=910","title":{"rendered":"Vim, gu\u00eda de referencia r\u00e1pida"},"content":{"rendered":"<p><a href=\"http:\/\/www.vim.org\/\">Vim<\/a> (Vi IMproved) es uno de los mejores editores que existen para consola (aunque tambi\u00e9n hay una versi\u00f3n gr\u00e1fica). Destaca por su simplicidad y la posibilidad de trabajar sin tener que levantar las manos del teclado, no obstante la curva de aprendizaje inicial es algo elevada y esto puede frenar a algunos usuarios.<\/p>\n<p>Por defecto Ubuntu instala una versi\u00f3n reducida (tiny) de este editor que no es tan configurable como la versi\u00f3n completa, as\u00ed que antes de empezar nos aseguramos de tener esta \u00faltima:<\/p>\n<pre>\r\nsudo aptitude install vim\r\n<\/pre>\n<p>A continuaci\u00f3n creamos el fichero &#8216;\/etc\/vim\/vimrc.local&#8217; (o ~\/.vimrc si solo queremos que afecte nuestro usuario) con la siguiente configuraci\u00f3n:<br \/>\n<!--more--><\/p>\n<pre>\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Modified by Sergi Blanco Cuaresma\r\n\" Based on Awesome Vim version 5.0 - 29\/05\/12 15:43:36:\r\n\"       Amir Salihefendic\r\n\"       http:\/\/amix.dk - amix@amix.dk\r\n\"       http:\/\/amix.dk\/blog\/post\/19691#The-ultimate-Vim-configuration-on-Github\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => General\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Sets how many lines of history VIM has to remember\r\nset history=700\r\n\r\n\" Enable filetype plugins\r\nfiletype plugin on\r\nfiletype indent on\r\n\r\n\" Set to auto read when a file is changed from the outside\r\nset autoread\r\n\r\n\" With a map leader it's possible to do extra key combinations\r\n\" like &#60;leader>w saves the current file\r\nlet mapleader = \",\"\r\nlet g:mapleader = \",\"\r\n\r\n\" Allow saving of files as sudo when I forgot to start vim using sudo.\r\ncmap w!! %!sudo tee > \/dev\/null %\r\n\r\n\" Correct typical mistakes (capital letters)\r\nnmap :W :w\r\nnmap :Q :q\r\nnmap :WQ :wq\r\nnmap :wQ :wq\r\nnmap :Wq :wq\r\n\r\n\"\" Tab indentation in other modes and shift-tab for unidenting\r\n\" for command mode\r\nnmap &#60;S-Tab> &#60;\r\n\" for insert mode\r\nimap &#60;S-Tab> &#60;Esc>&#60;i\r\n\" for visual mode\r\nvmap &#60;S-Tab> &#60;gv\r\nvmap &#60;Tab> >gv\r\n\r\n\" Copy\/paste from system clipboard\r\nmap &#60;C-y> \"+y&#60;CR>\r\nmap &#60;C-p> \"+P&#60;CR>\r\n\r\n\" Toogle mouse\r\nnnoremap &#60;F8> :call ToggleMouse()&#60;CR>\r\n\r\n\" Indentation guides\r\nnmap &#60;S-F5> :call ToggleIndentGuidesTabs()&#60;cr>\r\nnmap &#60;F5> :call ToggleIndentGuidesSpaces()&#60;cr>\r\n\r\n\" Troggle wrapping\r\n\" - For moving within wrapped lines use g[cursor] in normal mode \r\nmap &#60;F6> :set nowrap! &#60;CR>\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => VIM user interface\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Set 7 lines to the cursor - when moving vertically using j\/k\r\nset so=7\r\n\r\n\" Turn on the WiLd menu. Try it using:\r\n\" - :b &#60;Tab>\r\n\" - :e &#60;Tab>\r\nset wildmenu\r\n\r\n\" Ignore compiled files\r\nset wildignore=*.o,*~,*.pyc\r\n\r\n\"Always show current position\r\nset ruler\r\n\r\n\" Height of the command bar\r\nset cmdheight=2\r\n\r\n\" A buffer becomes hidden when it is abandoned\r\nset hid\r\n\r\n\" Configure backspace so it acts as it should act\r\nset backspace=eol,start,indent\r\nset whichwrap+=&#60;,>,h,l\r\n\r\n\" Ignore case when searching\r\nset ignorecase\r\n\r\n\" When searching try to be smart about cases \r\nset smartcase\r\n\r\n\" Highlight search results\r\nset hlsearch\r\n\r\n\" Makes search act like search in modern browsers\r\nset incsearch \r\n\r\n\" Don't redraw while executing macros (good performance config)\r\nset lazyredraw \r\n\r\n\" For regular expressions turn magic on\r\nset magic\r\n\r\n\" Show matching brackets when text indicator is over them\r\nset showmatch \r\n\" How many tenths of a second to blink when matching brackets\r\nset mat=2\r\n\r\n\" Show line number\r\nset nonumber\r\n\"set number\r\n\r\n\" Activate mouse\r\n\"set mouse=a\r\n\r\n\" No annoying sound on errors\r\nset noerrorbells\r\nset novisualbell\r\nset t_vb=\r\nset tm=500\r\nset vb\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Colors and Fonts\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Enable syntax highlighting\r\nsyntax enable \r\n\r\ntry\r\n    colorscheme desert\r\ncatch\r\nendtry\r\n\r\nset background=dark\r\n\r\n\" Set extra options when running in GUI mode\r\nif has(\"gui_running\")\r\n    try\r\n        colorscheme koehler\r\n    catch\r\n    endtry\r\n    set guioptions-=T\r\n    set guioptions+=e\r\n    set t_Co=256\r\n    set guitablabel=%M\\ %t\r\nendif\r\n\r\n\" Set utf8 as standard encoding and en_US as the standard language\r\nset encoding=utf8\r\n\r\n\" Use Unix as the standard file type\r\nset ffs=unix,dos,mac\r\n\r\n\" Set font according to system\r\nif has(\"mac\") || has(\"macunix\")\r\n    set gfn=Monaco:h15\r\n    set shell=\/bin\/bash\r\nelseif has(\"win16\") || has(\"win32\")\r\n    set gfn=Bitstream\\ Vera\\ Sans\\ Mono:h12\r\nelseif has(\"linux\")\r\n    set guifont=Monospace\\ 11\r\n    set shell=\/bin\/bash\r\nelse\r\n    set guifont=Monospace\\ 11\r\n    set shell=\/bin\/bash\r\nendif\r\n\r\n\" Open MacVim in fullscreen mode\r\nif has(\"gui_macvim\")\r\n    set fuoptions=maxvert,maxhorz\r\n    \"au GUIEnter * set fullscreen\r\nendif\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Files, backups and undo\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Turn backup off, since most stuff is in SVN, git et.c anyway...\r\nset nobackup\r\nset nowb\r\nset noswapfile\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Turn persistent undo on \r\n\"    means that you can undo even when you close a buffer\/VIM\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\ntry\r\n    set undodir=~\/.vim\/undodir\r\n    set undofile\r\n    set undolevels = 1000 \"maximum number of changes that can be undone\r\n    set undoreload = 10000 \"maximum number lines to save for undo on a buffer reload\r\ncatch\r\nendtry\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Parenthesis\/bracket\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Visual selection and $1 to suround it by (), etc...\r\nvnoremap $1 &#60;esc>`>a)&#60;esc>`&#60;i(&#60;esc>\r\nvnoremap $2 &#60;esc>`>a]&#60;esc>`&#60;i[&#60;esc>\r\nvnoremap $3 &#60;esc>`>a}&#60;esc>`&#60;i{&#60;esc>\r\nvnoremap $$ &#60;esc>`>a\"&#60;esc>`&#60;i\"&#60;esc>\r\nvnoremap $q &#60;esc>`>a'&#60;esc>`&#60;i'&#60;esc>\r\nvnoremap $e &#60;esc>`>a\"&#60;esc>`&#60;i\"&#60;esc>\r\n\r\n\" Map auto complete of (, \", ', [ in insert mode\r\ninoremap $1 ()&#60;esc>i\r\ninoremap $2 []&#60;esc>i\r\ninoremap $3 {}&#60;esc>i\r\ninoremap $4 {&#60;esc>o}&#60;esc>O\r\ninoremap $q ''&#60;esc>i\r\ninoremap $e \"\"&#60;esc>i\r\ninoremap $t &#60;>&#60;esc>i\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Text, tab and indent related\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Use spaces instead of tabs\r\nset expandtab\r\n\r\n\" Be smart when using tabs ;)\r\nset smarttab\r\n\r\n\" 1 tab == 4 spaces\r\nset shiftwidth=4\r\nset tabstop=4\r\n\r\n\" Linebreak on 500 characters\r\nset lbr\r\nset tw=500\r\n\r\nset autoindent \"Auto indent\r\n\" indent depending on the filetype\r\n\"set smartindent\r\nset nosmartindent\r\nfiletype indent on\r\n\r\nset wrap \"Wrap lines\r\n\r\ntry\r\n    \" Mark at 80 characters\r\n    set colorcolumn=81\r\ncatch\r\nendtry\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Visual mode related\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Visual mode pressing * or # searches for the current selection\r\n\" Super useful! From an idea by Michael Naumann\r\nvnoremap &#60;silent> * :call VisualSelection('f')&#60;CR>\r\nvnoremap &#60;silent> # :call VisualSelection('b')&#60;CR>\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Moving around, tabs, windows and buffers\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Treat long lines as break lines (useful when moving around in them)\r\nmap &#60;Down> gj\r\nmap &#60;Up> gk\r\n\r\n\" Map &#60;Space> to \/ (search) and Ctrl-&#60;Space> to ? (backwards search)\r\nmap &#60;space> \/\r\nmap &#60;c-space> ?\r\n\r\n\" Disable highlight when &#60;leader>&#60;cr> is pressed\r\nmap &#60;silent> &#60;leader>&#60;cr> :noh&#60;cr>\r\n\r\n\" Smart way to move between windows\r\nmap &#60;M-Down> &#60;C-W>j\r\nmap &#60;M-Up> &#60;C-W>k\r\nmap &#60;M-Left> &#60;C-W>h\r\nmap &#60;M-Right> &#60;C-W>l\r\n\r\n\" Buffer shortcuts\r\nnmap &#60;C-Left> :bprevious!&#60;cr>\r\nnmap &#60;C-Right> :bnext!&#60;cr>\r\n\" Close the current buffer\r\nmap &#60;leader>bc :Bclose&#60;cr>\r\nmap &#60;leader>bd :bdelete&#60;cr> \r\n\r\n\" Quickly open a buffer for scripbble\r\nmap &#60;leader>q :e ~\/buffer&#60;cr>\r\n\r\n\" When editing a file, always jump to the last cursor position\r\nautocmd BufReadPost *\r\n      \\ if line(\"'\\\"\") > 0 && line (\"'\\\"\") &#60;= line(\"$\") |\r\n      \\   exe \"normal g'\\\"\" |\r\n      \\ endif\r\n\r\n\" Tell vim to remember certain things when we exit\r\n\"  '10  :  marks will be remembered for up to 10 previously edited files\r\n\"  \"100 :  will save up to 100 lines for each register\r\n\"  :20  :  up to 20 lines of command-line history will be remembered\r\n\"  %    :  saves and restores the buffer list\r\n\"  n... :  where to save the viminfo files\r\n\"set viminfo='10,\\\"100,:20,%,n~\/.viminfo\r\nset viminfo='10,\\\"100,:20,n~\/.viminfo\r\n\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Status line\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Always show the status line\r\nset laststatus=2\r\n\r\n\" Format the status line\r\nset statusline=\\ %{HasPaste()}%F%m%r%h\\ %w\\ \\ CWD:\\ %r%{getcwd()}%h\\ \\ \\ Line:\\ %l\r\n\r\n\" In case the Powerline plugin is installed:\r\nset nocompatible   \" Disable vi-compatibility\r\nset t_Co=256 \" Explicitly tell vim that the terminal supports 256 colors\r\nlet g:Powerline_stl_path_style ='relative'\r\n\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Editing mappings\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Delete trailing white space on save, useful for Python and CoffeeScript ;)\r\nfunc! DeleteTrailingWS()\r\n  exe \"normal mz\"\r\n  %s\/\\s\\+$\/\/ge\r\n  exe \"normal `z\"\r\nendfunc\r\nautocmd BufWrite *.py :call DeleteTrailingWS()\r\nautocmd BufWrite *.coffee :call DeleteTrailingWS()\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => vimgrep searching and cope displaying\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" When you press gv you vimgrep after the selected text\r\nvnoremap &#60;silent> gv :call VisualSelection('gv')&#60;CR>\r\n\r\n\" Open vimgrep and put the cursor in the right position\r\nmap &#60;leader>g :vimgrep \/\/ **\/*.&#60;left>&#60;left>&#60;left>&#60;left>&#60;left>&#60;left>&#60;left>\r\n\r\n\" Vimgreps in the current file\r\nmap &#60;leader>&#60;space> :vimgrep \/\/ &#60;C-R>%&#60;C-A>&#60;Home>&#60;right>&#60;right>&#60;right>&#60;right>&#60;right>&#60;right>&#60;right>&#60;right>&#60;right>\r\n\r\n\" When you press &#60;leader>r you can search and replace the selected text\r\nvnoremap &#60;silent> &#60;leader>r :call VisualSelection('replace')&#60;CR>\r\n\r\n\" Do :help cope if you are unsure what cope is. It's super useful!\r\n\"\r\n\" When you search with vimgrep, display your results in cope by doing:\r\n\"   &#60;leader>cc\r\n\"\r\n\" To go to the next search result do:\r\n\"   &#60;leader>n\r\n\"\r\n\" To go to the previous search results do:\r\n\"   &#60;leader>p\r\n\"\r\nmap &#60;leader>cc :botright cope&#60;cr>\r\nmap &#60;leader>co ggVGy:tabnew&#60;cr>:set syntax=qf&#60;cr>pgg\r\nmap &#60;leader>n :cn&#60;cr>\r\nmap &#60;leader>p :cp&#60;cr>\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Spell checking\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Pressing ,ss will toggle and untoggle spell checking\r\nmap &#60;leader>ss :setlocal spell!&#60;cr>\r\n\r\n\" Shortcuts using &#60;leader>\r\nmap &#60;leader>sn ]s\r\nmap &#60;leader>sp [s\r\nmap &#60;leader>sa zg\r\nmap &#60;leader>s? z=\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Misc\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Remove the Windows ^M - when the encodings gets messed up\r\nnoremap &#60;Leader>m mmHmt:%s\/&#60;C-V>&#60;cr>\/\/ge&#60;cr>'tzt'm\r\n\r\n\" Toggle paste mode on and off\r\nmap &#60;leader>pp :setlocal paste!&#60;cr>\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => :Explore\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" Open file in current window\r\nlet g:netrw_browse_split=0\r\n\r\n\" Hide files\r\nlet g:netrw_hide=1\r\n\r\n\" Files to be hidden (comma separated)\r\nlet g:netrw_list_hide='^\\..*'\r\n\r\n\" Long list mode (details)\r\nlet g:netrw_longlist=1\r\n\r\n\" Sort by name, time or size\r\nlet g:netrw_sort_by=\"name\"\r\n\r\n\" Sorted in a normal or reverse\r\nlet g:netrw_sort_direction=\"normal\"\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => bufExplorer plugin\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\"let g:bufExplorerSortBy='name'\r\nlet g:bufExplorerSortBy='number'\r\nmap &#60;leader>o :TMiniBufExplorer&#60;cr>\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Nerd Tree\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\nmap &#60;leader>nn :NERDTreeToggle&#60;cr>\r\n\"map &#60;leader>nf :NERDTreeFind&#60;cr>\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => tagList plugin\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\nmap &#60;leader>tt :Tlist &#60;CR>\r\n\r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Python section\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\nlet python_highlight_all = 1\r\nau FileType python syn keyword True None False self\r\n\r\nau FileType python map &#60;buffer> F :set foldmethod=indent&#60;cr>\r\n\r\nau FileType python inoremap &#60;buffer> $r return \r\nau FileType python inoremap &#60;buffer> $i import \r\nau FileType python inoremap &#60;buffer> $p print \r\nau FileType python inoremap &#60;buffer> $f #--- PH ----------------------------------------------&#60;esc>FP2xi\r\nau FileType python map &#60;buffer> &#60;leader>1 \/class \r\nau FileType python map &#60;buffer> &#60;leader>2 \/def \r\nau FileType python map &#60;buffer> &#60;leader>C ?class \r\nau FileType python map &#60;buffer> &#60;leader>D ?def \r\n\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\" => Helper functions\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\nfunction! CmdLine(str)\r\n    exe \"menu Foo.Bar :\" . a:str\r\n    emenu Foo.Bar\r\n    unmenu Foo\r\nendfunction \r\n\r\nfunction! VisualSelection(direction) range\r\n    let l:saved_reg = @\"\r\n    execute \"normal! vgvy\"\r\n\r\n    let l:pattern = escape(@\", '\\\\\/.*$^~[]')\r\n    let l:pattern = substitute(l:pattern, \"\\n$\", \"\", \"\")\r\n\r\n    if a:direction == 'b'\r\n        execute \"normal ?\" . l:pattern . \"^M\"\r\n    elseif a:direction == 'gv'\r\n        call CmdLine(\"vimgrep \" . '\/'. l:pattern . '\/' . ' **\/*.')\r\n    elseif a:direction == 'replace'\r\n        call CmdLine(\"%s\" . '\/'. l:pattern . '\/')\r\n    elseif a:direction == 'f'\r\n        execute \"normal \/\" . l:pattern . \"^M\"\r\n    endif\r\n\r\n    let @\/ = l:pattern\r\n    let @\" = l:saved_reg\r\nendfunction\r\n\r\n\r\n\" Returns true if paste mode is enabled\r\nfunction! HasPaste()\r\n    if &paste\r\n        return 'PASTE MODE  '\r\n    en\r\n    return ''\r\nendfunction\r\n\r\n\" Don't close window, when deleting a buffer\r\ncommand! Bclose call &#60;SID>BufcloseCloseIt()\r\nfunction! &#60;SID>BufcloseCloseIt()\r\n   let l:currentBufNum = bufnr(\"%\")\r\n   let l:alternateBufNum = bufnr(\"#\")\r\n\r\n   if buflisted(l:alternateBufNum)\r\n     buffer #\r\n   else\r\n     bnext\r\n   endif\r\n\r\n   if bufnr(\"%\") == l:currentBufNum\r\n     new\r\n   endif\r\n\r\n   if buflisted(l:currentBufNum)\r\n     execute(\"bdelete! \".l:currentBufNum)\r\n   endif\r\nendfunction\r\n\r\nfunction! ToggleMouse()\r\n  if &mouse == 'a'\r\n    set mouse=\r\n    echo \"Mouse usage disabled\"\r\n  else\r\n    set mouse=a\r\n    echo \"Mouse usage enabled\"\r\n  endif\r\nendfunction\r\n\r\nfunction! ToggleIndentGuidesTabs()\r\n\tif exists('b:iguides_tabs')\r\n\t\tsetlocal nolist\r\n\t\tlet &l:listchars = b:iguides_tabs\r\n\t\tunlet b:iguides_tabs\r\n\telse\r\n\t\tlet b:iguides_tabs = &l:listchars\r\n\t\tsetlocal listchars=tab:?\\ \"protect the space\r\n\t\tsetlocal list\r\n\tendif\r\nendfunction\r\n\r\nfunction! ToggleIndentGuidesSpaces()\r\n\tif exists('b:iguides_spaces')\r\n\t\tcall matchdelete(b:iguides_spaces)\r\n\t\tunlet b:iguides_spaces\r\n\telse\r\n\t\tlet pos = range(1, &l:textwidth, &l:shiftwidth)\r\n\t\tcall map(pos, '\"\\\\%\" . v:val . \"v\"')\r\n\t\tlet pat = '\\%(\\_^\\s*\\)\\@&#60;=\\%(' . join(pos, '\\|') . '\\)\\s'\r\n\t\tlet b:iguides_spaces = matchadd('CursorLine', pat)\r\n\tendif\r\nendfunction\r\n<\/pre>\n<p>Por otra parte, si queremos utilizar la versi\u00f3n gr\u00e1fica de vim instalaremos &#8220;vim-full&#8221;:<\/p>\n<pre>\r\napt-get install vim-full\r\n<\/pre>\n<h3>Introducci\u00f3n<\/h3>\n<p>Para editar un archivo con Vim ejecutaremos:<\/p>\n<pre>\r\nvim nombre_archivo.txt\r\ngvim nombre_archivo.txt\r\n<\/pre>\n<p>Es habitual que se tenga definido un alias de forma que cuando ejecutemos &#8220;vi&#8221;, realmente estemos ejecutando &#8220;vim&#8221;:<\/p>\n<pre>\r\nalias vi='vim'\r\n<\/pre>\n<p>Este texto debe ser incluido en los archivos .bashrc y .bash_profile del directorio personal del usuario (cd $HOME).<\/p>\n<p>Una vez tenemos abierto vim y estamos editando un archivo debemos conocer diversos comandos para poder utilizar el entorno. El editor se puede encontrar en 3 modos diferentes:<\/p>\n<ul>\n<li>Modo normal (Normal mode): Se pueden utilizar ciertas combinaciones de teclas para realizar ciertas acciones. Para acceder a este modo presionar escape.<\/li>\n<li>Modo inserci\u00f3n (Insertion mode): Se puede insertar (insert) o sobreescribir el texto (append). Para acceder a este modo presionar &#8216;i&#8217;, &#8216;a&#8217; o la tecla &#8216;insert&#8217; (1 vez = insert, 2 veces = append).<\/li>\n<li>Modo comando (Command mode): Se puede utilizar cualquier comando SED adem\u00e1s de funciones propias de Vim.  Para acceder a este modo se debe estar en modo normal y pulsar &#8216;:&#8217;, a continuaci\u00f3n se escribir\u00e1 nuestra petici\u00f3n.<\/li>\n<li>Modo visual (visual mode): Se puede selecionar texto para tratarlo en conjunto. Para acceder a este modo se debe estar en modo normal y pulsar &#8216;v&#8217;.<\/li>\n<\/ul>\n<h3>Modo Normal<\/h3>\n<ul>\n<li> Desplazamiento con los cursores del teclado o con h (izquierda), j (arriba), k (abajo) y l (derecha)<\/li>\n<li> \u00daltima l\u00ednea<\/li>\n<p>G<\/p>\n<li> Primera l\u00ednea<\/li>\n<p>gg<\/p>\n<li> Deshacer<\/li>\n<p>u<\/p>\n<li> Rehacer<\/li>\n<p>CTRL+r<\/p>\n<li> Buscar un texto<\/li>\n<p>\/texto[ENTER]<\/p>\n<li> Buscar el texto donde se encuentra el cursor<\/li>\n<p>%<\/p>\n<li> Buscar el texto donde se encuentra el cursor en sentido inverso<\/li>\n<p>#<\/p>\n<li> Repetir \u00faltima b\u00fasqueda<\/li>\n<p>n<\/p>\n<li> Repetir \u00faltima b\u00fasqueda en sentido contrario<\/li>\n<p>N<\/p>\n<li> Dividir la pantalla horizontalmente en 2:<\/li>\n<p>CTRL+ws<\/p>\n<li> Dividir la pantalla verticalmente en 2:<\/li>\n<p>CTRL+wv<\/p>\n<li> Crear un nuevo archivo en una pantalla dividida horizontalmente:<\/li>\n<p>CTRL+wn<\/p>\n<li> Cerrar la divisi\u00f3n actual<\/li>\n<p>CTRL+wq<\/p>\n<li> Moverse a la ventana de arriba (j), abajo (k), izquierda (h) o derecha (l):<\/li>\n<p>CTRL+w{j,k,h,l} \u00f3 CTRL+w{cursores del teclado}<\/p>\n<li> Hacer todas las ventanas del mismo tama\u00f1o<\/li>\n<p>CTRL+w=<\/p>\n<li> Incrementar\/Decrementar la altura de la ventana actual<\/li>\n<p>CTRL+{+,-}<\/p>\n<li> Nueva pesta\u00f1a<\/li>\n<p>CTRL+t<\/p>\n<li> Siguiente o anterior pesta\u00f1a<\/li>\n<p>CTRL+n<br \/>\nCTRL+p<\/p>\n<li> Cerrar pesta\u00f1a<\/li>\n<p>CTRL+c<\/p>\n<li> Seleccionar todo el texto<\/li>\n<p>ggVG<\/p>\n<li> Establecer una marca con el nombre &#8216;a&#8217;<\/li>\n<p>ma<\/p>\n<li> Ir a la marca &#8216;a&#8217;<\/li>\n<p>&#8216;a<\/p>\n<li> Ir a la \u00faltima l\u00ednea modificada<\/li>\n<p>&#8216;.\n<\/ul>\n<h3>Modo Inserci\u00f3n<\/h3>\n<ul>\n<li> Autocompletar palabra en base al texto ya existente<\/li>\n<p>CTRL+N y CTRL+P (p.ej. &#8220;hola hCTRL+N&#8221; resultado &#8220;hola hola&#8221;)<\/p>\n<li> Indentar<\/li>\n<p>CTRL+t<\/p>\n<li> Desindentar<\/li>\n<p>CTRL+d\n<\/ul>\n<h3>Modo Comando<\/h3>\n<p><i>Pulsar [ENTER] despu\u00e9s de cada comando<\/i><\/p>\n<ul>\n<li>Ir a la linea 25<\/li>\n<p>:25<\/p>\n<li>Salir<\/li>\n<p>:q<\/p>\n<li>Salir cerrando todos los ficheros abiertos<\/li>\n<p>:qa<\/p>\n<li>Guardar<\/li>\n<p>:w<\/p>\n<li>Salir guardando<\/li>\n<p>:wq<\/p>\n<li>Salir sin guardar<\/li>\n<p>:q!<\/p>\n<li>Guardar en fichero de solo lectura (s\u00f3lo root)<\/li>\n<p>:w!<\/p>\n<li>Guardar con otro nombre<\/li>\n<p>:w archivo<\/p>\n<li>Editar archivo<\/li>\n<p>:e archivo<\/p>\n<li>Cerrar archivo<\/li>\n<p>:bdelete<\/p>\n<li>Navegar a partir de un directorio<\/li>\n<p>:e directorio<br \/>\n:Explore<\/p>\n<li>Substituir una cadena de texto A por B <i>(si alguna de estas cadenas contiene caracteres que tengan algun significado especial como por ejemplo &#8216;\/&#8217; se debe anular antes la funcionalidad de este con \\, por ejemplo, substituir los &#8216;\/&#8217; por &#8216;.&#8217; seria :s\/\\\/\/.\/)<\/i><\/li>\n<p>:%s\/A\/B\/ (p.ej. :s\/hola\/adios)<\/p>\n<li>Substituir una cadena de texto A por B en todo el texto<\/li>\n<p>:%s\/A\/B\/g<\/p>\n<li>Substituir una cadena de texto A por B entre la linea 2 y 10<\/li>\n<p>:2,10s\/A\/B\/g<\/p>\n<li>Activar la inserci\u00f3n en &#8220;modo paste&#8221;, esto permite pegar cosas al documento (usando el rat\u00f3n) de forma que no tabule lo que pegamos, ya que si ese texto ya esta tabulado lo \u00fanico que hace es pegar desordenando el texto.<\/li>\n<p>:set paste<\/p>\n<li>Desactivar la inserci\u00f3n en &#8220;modo paste&#8221;<\/li>\n<p>:set nopaste<\/p>\n<li>Cortar las l\u00edneas que no caben en pantalla.<\/li>\n<p>:set wrap<\/p>\n<li>No cortar las l\u00edneas que no caben en pantalla<\/li>\n<p>:set nowrap<\/p>\n<li>Dividir pantalla horizontalmente<\/li>\n<p>:split<\/p>\n<li>Dividir pantalla verticalmente<\/li>\n<p>:vsplit<\/p>\n<li>Crear nueva pantalla dividida<\/li>\n<p>:new<\/p>\n<li>Quedarse solo con la ventana actual y ocultar el resto<\/li>\n<p>:only<\/p>\n<li>Listar todos los ficheros abiertos (buffers)<\/li>\n<p>:files \u00f3 :buffers<\/p>\n<li>Ir al buffer X (los numeros aparecen al hacer un :files o :buffers *en plural*)<\/li>\n<p>:file X \u00f3 :buffer X<\/p>\n<li>Ir al buffer X (pulsar tabulador para autocompletar)<\/li>\n<p>:b X<\/p>\n<li>Ayuda<\/li>\n<p>:help \u00f3 :help termino\n<\/ul>\n<h3>Modo Visual<\/h3>\n<p>Como ya hemos comentado, para acceder a este modo se debe estar en modo normal y pulsar \u2018v\u2019. No obstante, si en lugar de &#8216;v&#8217; pulsamos &#8216;Ctrl+v&#8217; pasaremos al modo visual en bloque (permite seleccionar un bloque de texto por columnas en lugar de por filas). Y si pulsamos &#8216;gv&#8217; se repetir\u00e1 la \u00faltima selecci\u00f3n.<\/p>\n<ul>\n<li>Seleccionar texto utilizando h(izquierda), j (arriba), k (abajo) y l (derecha) o con los cursores del teclado.<\/li>\n<p><\/p>\n<li>Es posible aplicar las mismas instrucciones vista en el modo comando y modo normal, pero esto solo se realizar\u00e1 sobre el texto seleccionado.<\/li>\n<p><\/p>\n<li>Si seleccionamos texto y pasamos a modo comando pulsando &#8216;:&#8217; se nos mostrar una linea como esta &#8220;:&#8217; &#60;,&#8217;>&#8221;, no debemos borrar estos s\u00edmbolos ya que es la forma de reconocer vim que estamos aplicando el comando al texto seleccionado.<\/li>\n<p><\/p>\n<li>Copiar el texto selecionado<\/li>\n<p>y<\/p>\n<li>Copiar el texto selecionado en el portapapeles del sistema (teclear el + tambi\u00e9n)<\/li>\n<p>&#8220;+y<\/p>\n<li>Cortar el texto seleccionado<\/li>\n<p>d<\/p>\n<li>Pegar el texto copiado o cortado. Debemos estar en modo normal, se pasar\u00e1 autom\u00e1ticamente a ese modo despues de copiar o cortar con &#8216;y&#8217; o &#8216;d&#8217;.<\/li>\n<p>p<\/p>\n<li>Pegar el texto desde el portapapeles del sistema (teclear el + tambi\u00e9n)<\/li>\n<p>&#8220;+p<\/p>\n<li>Indentar<\/li>\n<p>>><\/p>\n<li>Indentar<\/li>\n<p>&#60;&#60;<\/p>\n<li>Modo visual seleccionando columnas en lugar de lineas<\/li>\n<p>CTRL+v<\/p>\n<li>Insertar texto delante de la columna<\/li>\n<p>CTRL+v SHIFT+i &#8216;texto&#8217; ESC\n<\/ul>\n<h3>Corrector ortogr\u00e1fico<\/h3>\n<p>Por defecto, vim dispone de corrector para Ingl\u00e9s pero si activamos otros idiomas, el editor nos pregunar\u00e1 si deseamos descargar los correspondientes diccionarios autom\u00e1ticamente.<\/p>\n<ul>\n<li>Activar corrector<\/li>\n<p>:set spell<\/p>\n<li>Desactivar corrector<\/li>\n<p>:set nospell<\/p>\n<li>Seleccionamos idioma<\/li>\n<p>:set spelllang=es<br \/>\n:set spelllang=ca<br \/>\n:set spelllang=en<br \/>\n:set spelllang=fr\n<\/ul>\n<p>Las palabras incorrectas se marcaran en color rojo y podremos interaccionar en modo normal:<\/p>\n<ul>\n<li>Siguiente palabra incorrecta<\/li>\n<p>]s<\/p>\n<li>Previa palabra incorrecta<\/li>\n<p>[s<\/p>\n<li>Sugerencias de correcci\u00f3n para una palabra<\/li>\n<p>z=<\/p>\n<li>A\u00f1adir una palabra al diccionario<\/li>\n<p>zg<\/p>\n<li>Borrar una palabra del diccionario<\/li>\n<p>zw\n<\/ul>\n<p>En la p\u00e1gina de <a href=\"http:\/\/www.vim.org\/\">Vim<\/a> se puede encontrar m\u00e1s informaci\u00f3n, incluso scripts que a\u00f1aden funcionalidades interesantes. Recomendables:<\/p>\n<ul>\n<li><a href=\"http:\/\/vim.sourceforge.net\/scripts\/script.php?script_id=159\">MiniBuffExplorer<\/a>: A\u00f1ade una barra con el listado de ficheros (buffers) abiertos (F2 para visualizarlo, CTRL+n y CTRL+p para el siguiente\/anterior segun establecido en el archivo de configuraci\u00f3n de este art\u00edculo).<\/li>\n<li><a href=\"http:\/\/www.vim.org\/scripts\/script.php?script_id=273\">TagList<\/a>: Acceso a funciones\/m\u00e9todos para diversos lenguajes de programaci\u00f3n mediante :Tlist (Requiere apt-get install exuberant-ctags) o F4 (segun la configuraci\u00f3n indicada en este art\u00edculo)<\/li>\n<li><a href=\"http:\/\/www.vim.org\/scripts\/script.php?script_id=1218\">NERD Comment<\/a>: Comentar lineas o bloques de c\u00f3digo utilizando ,cc \/ ,cu \/ ,c[espacio]<\/li>\n<li><a href=\"http:\/\/www.vim.org\/scripts\/script.php?script_id=1658\">NERD Tree<\/a>: Alternativa al navegador de ficheros :Explore visualizable mediante :NERDTreeToggle o F3\/shift-F3<\/li>\n<li><a href=\"http:\/\/www.vim.org\/scripts\/script.php?script_id=3881\">PowerLine<\/a>: L\u00ednea de estado con colores e indicaciones configurables.<\/li>\n<li><a href=\"http:\/\/www.vim.org\/scripts\/script.php?script_id=90\">VCScommand<\/a>: Comandos para controlar el repositorio de control de versiones (Subversion, Git&#8230;) desde vim.<\/li>\n<\/ul>\n<p>Es possible instalar los scripts anteriores mediante:<\/p>\n<pre>\r\n#### Taglist\r\nsudo apt-get install exuberant-ctags\r\nmkdir ~\/.vim\r\nmkdir ~\/.vim\/plugin\r\nmkdir ~\/.vim\/doc\r\nrm -f ~\/.viminfo\r\ncd ~\/.vim\r\nwget http:\/\/www.vim.org\/scripts\/download_script.php?src_id=7701 -O taglist_45.zip\r\nunzip taglist_45.zip \r\nrm -f taglist_45.zip\r\n\r\n### Git\r\nwget http:\/\/www.vim.org\/scripts\/download_script.php?src_id=17031 -O vcscommand-1.99.46.zip\r\nunzip vcscommand-1.99.46.zip \r\nrm -f vcscommand-1.99.46.zip \r\n# It can be used in individual files or in a Explorer for the directory:\r\n# :VCSStatus or \\cs \r\n# :VCSCommit    \\cc\r\n# :VCSUpdate    \\cu\r\n# :VCSAdd       \\ca\r\n# :VCSDelete    \\cD\r\n# :VCSAnnotate  \\cN\r\n# :VCSVimDiff   \\cv\r\n# :VCSLog       \\cl\r\n\r\n### Nerd Tree\r\nwget http:\/\/www.vim.org\/scripts\/download_script.php?src_id=17123 -O nerdtree.zip\r\nunzip nerdtree.zip \r\nrm -f nerdtree.zip \r\n\r\n### PowerLine\r\nwget http:\/\/www.vim.org\/scripts\/download_script.php?src_id=17546 -O Lokaltog-vim-powerline-d885f90.tar.gz\r\ntar -zxvf Lokaltog-vim-powerline-d885f90.tar.gz\r\nmv -f Lokaltog-vim-powerline-d885f90\/* ~\/.vim\/\r\nrm -rf Lokaltog-vim-powerline-d885f90 Lokaltog-vim-powerline-d885f90.tar.gz\r\n\r\n#### MiniBufExplorer\r\ncd ~\/.vim\/plugin\r\n#wget http:\/\/vim.sourceforge.net\/scripts\/download_script.php?src_id=3640 -O minibufexpl.vim\r\nwget https:\/\/raw.github.com\/fholgado\/minibufexpl.vim\/d92c8b01248d612444829001b3e081629d37a1aa\/plugin\/minibufexpl.vim\r\n\r\n#### Comments\r\nwget http:\/\/www.vim.org\/scripts\/download_script.php?src_id=14455 -O nerdcommenter.zip\r\nunzip nerdcommenter.zip\r\n# ,cc to comment\r\n# ,cu to uncomment\r\n# ,c[space] to toggle\r\n<\/pre>\n<p>Finalmente, para que cada vez que abramos un fichero en nautilus con gvim lo haga en la misma instancia debemos<br \/>\ncrear &#8216;~\/.local\/share\/applications\/gvim-buf.desktop&#8217; con el siguiente contenido:<\/p>\n<pre>\r\n[Desktop Entry]\r\nEncoding=UTF-8\r\nName=GVim (Buffers)\r\nComment=Edit text files in a new tab\r\nExec=gvim --remote-silent %F\r\nTerminal=false\r\nType=Application\r\nIcon=\/usr\/share\/pixmaps\/vim.svg\r\nCategories=Application;Utility;TextEditor;\r\nStartupNotify=true\r\nMimeType=text\/plain;\r\nNoDisplay=true\r\n<\/pre>\n<p>Y para tener el mismo efecto desde una terminal, editamos &#8216;~\/.bashrc&#8217; y a\u00f1adimos:<\/p>\n<pre>\r\nalias gvim='gvim --remote-silent'\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Vim (Vi IMproved) es uno de los mejores editores que existen para consola (aunque tambi\u00e9n hay una versi\u00f3n gr\u00e1fica). Destaca por su simplicidad y la posibilidad de trabajar sin tener que levantar las manos del teclado, no obstante la curva de aprendizaje inicial es algo elevada y esto puede frenar a algunos usuarios. Por defecto &hellip; <a href=\"https:\/\/www.marblestation.com\/?p=910\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Vim, gu\u00eda de referencia r\u00e1pida<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,6],"tags":[],"class_list":["post-910","post","type-post","status-publish","format-standard","hentry","category-espanyol","category-tecnologia"],"_links":{"self":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=910"}],"version-history":[{"count":26,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/910\/revisions"}],"predecessor-version":[{"id":921,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/910\/revisions\/921"}],"wp:attachment":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}