diff --git a/README.md b/README.md index 489ec5f9..9ee021de 100644 --- a/README.md +++ b/README.md @@ -1,69 +1,18 @@ -# The Ultimate vimrc +# Fork de amix/vimrc optimizado para MacBook Pro 15" -Over the last 8 years I have used and tweaked Vim. This is my Ultimate vimrc. +## Instalación -There are two versions: + git clone https://github.com/facundolaffont/vimrc.git ~/.vim_runtime + sh ~/.vim_runtime/instalación.sh -* **Basic**: If you want something small just copy [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim) into your ~/.vimrc and you will have a great basic setup -* **Awesome**: This includes a ton of useful plugins, color schemes and configurations +Es recomendable usar las [fuentes tipográficas Source Code Pro](https://github.com/adobe-fonts/source-code-pro). Son gratis y están alojadas en GitHub -I would of course recommend using the awesome version.c - -## How to install the Awesome version? -The awesome version includes a lot of great plugins, configurations and color schemes that make Vim a lot better. To install it simply do following: - - git clone https://github.com/amix/vimrc.git ~/.vim_runtime - sh ~/.vim_runtime/install_awesome_vimrc.sh - -I also recommend using [Source Code Pro font from Adobe](http://store1.adobe.com/cfusion/store/html/index.cfm?event=displayFontPackage&code=1960) (it's free and awesome font for writing and programming). The Awesome vimrc is already setup to try to use it - -## How to install the Basic version? -The basic version is basically just one file and no plugins. You can check out [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim). - -This is useful to install on remote servers where you don't need many plugins and you don't do many edits. - - git clone git://github.com/amix/vimrc.git ~/.vim_runtime - sh ~/.vim_runtime/install_basic_vimrc.sh - - -## How to install on Windows? - -Use [msysgit](http://msysgit.github.com/) to checkout the repository and run the installation instructions above. No special instructions needed ;-) - - -## How to install on Linux - -If you have vim aliased as `vi` instead of `vim`, make sure to either alias it: `alias vi=vim`. Otherwise, `apt-get install vim` - -## How to update to latest version? - -Simply just do a git rebase! +## Cómo actualizar a la última versión cd ~/.vim_runtime git pull --rebase - -## Some screenshots - -Colors when editing a Python file: -![Screenshot 1](http://files1.wedoist.com/e952fdb343b1e617b90d256e474d0370/as/screenshot_1.png) - -Opening recently opened files [mru.vim](https://github.com/vim-scripts/mru.vim): -![Screenshot 2](http://files1.wedoist.com/1967b0e48af40e513d1a464e08196990/as/screenshot_2.png) - -[NERD Tree](https://github.com/scrooloose/nerdtree) plugin in a terminal window: -![Screenshot 3](http://files1.wedoist.com/b1509d7ed9e9f357e8d04797f9fad67b/as/screenshot3.png) - -This vimrc even works on Windows! -![Screenshot 4](http://files1.wedoist.com/4e85163d97b81422240c822c82022f2f/as/screenshot_4.png) - -Distraction free mode using [goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2): -![Screenshot 5](https://d2dq6e731uoz0t.cloudfront.net/a5182977c3d6c2a6cd3f9e97398ca8ca/as/zen_mode.jpg) - - -## Included Plugins - -I recommend reading the docs of these plugins to understand them better. Each of them provide a much better Vim experience! +## Plugins incluídos * [pathogen.vim](https://github.com/tpope/vim-pathogen): Manages the runtime path of the plugins * [snipMate.vim](https://github.com/garbas/vim-snipmate): snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim @@ -86,16 +35,16 @@ Remove all clutter and focus only on the essential. Similar to iA Writer or Writ * [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim -## Included color schemes +## Esquemas de colores incluídos -* [peaksea](https://github.com/vim-scripts/peaksea): My favorite! +* [peaksea](https://github.com/vim-scripts/peaksea) * [vim-colors-solarized](https://github.com/altercation/vim-colors-solarized) * [vim-irblack](https://github.com/wgibbs/vim-irblack) * [mayansmoke](https://github.com/vim-scripts/mayansmoke) * [vim-pyte](https://github.com/therubymug/vim-pyte) -## Included modes +## Modos incluídos * [vim-coffee-script](https://github.com/kchmck/vim-coffee-script) * [vim-less](https://github.com/groenewege/vim-less) @@ -104,211 +53,14 @@ Remove all clutter and focus only on the essential. Similar to iA Writer or Writ * [nginx.vim](https://github.com/vim-scripts/nginx.vim): Highlights configuration files for nginx * [vim-go](https://github.com/fatih/vim-go) - -## How to include your own stuff? - -After you have installed the setup you can create **~/.vim_runtime/my_configs.vim** to fill in any configurations that are important for you. For instance, my **my_configs.vim** looks like this: - - ~/.vim_runtime (master)> cat my_configs.vim - map ct :cd ~/Desktop/Todoist/todoist - map cw :cd ~/Desktop/Wedoist/wedoist - -You can also install your own plugins, for instance, via pathogen we can install [vim-rails](https://github.com/tpope/vim-rails): +Se pueden instalar plugins personalizados, por ejemplo, via pathogen: cd ~/.vim_runtime git clone git://github.com/tpope/vim-rails.git sources_non_forked/vim-rails -Now you have vim-rails installed ;-) +Con estos dos comandos, ya se tendría instalado el plugin vim-rails - -## Key Mappings - -### Plugin related mappings - -Open [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) and see and manage the current buffers (`o`): - - map o :BufExplorer - -Open [MRU.vim](https://github.com/vim-scripts/mru.vim) and see the recently open files (`f`): - - map f :MRU - -Open [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin (`j` or `f`): - - let g:ctrlp_map = '' - -Managing the [NERD Tree](https://github.com/scrooloose/nerdtree) plugin: - - map nn :NERDTreeToggle - map nb :NERDTreeFromBookmark - map nf :NERDTreeFind - -[goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2) lets you only focus on one thing at a time. It removes all the distractions and centers the content. It has a special look when editing Markdown, reStructuredText and textfiles. It only has one mapping. (`z`) - - map z :Goyo - -### Normal mode mappings - -Fast saving of a buffer (`w`): - - nmap w :w! - -Map `` to `/` (search) and `+` to `?` (backwards search): - - map / - map ? - map :noh - -Disable highlight when `` is pressed: - - map :noh - -Smart way to move between windows (`j` etc.): - - map j - map k - map h - map l - -Closing of current buffer(s) (`bd` and (`ba`)): - - " Close current buffer - map bd :Bclose - - " Close all buffers - map ba :1,1000 bd! - -Useful mappings for managing tabs: - - map tn :tabnew - map to :tabonly - map tc :tabclose - map tm :tabmove - - " Opens a new tab with the current buffer's path - " Super useful when editing files in the same directory - map te :tabedit =expand("%:p:h")/ - -Switch CWD to the directory of the open buffer: - - map cd :cd %:p:h:pwd - -Open vimgrep and put the cursor in the right position: - - map g :vimgrep // **/*. - -Vimgreps in the current file: - - map :vimgrep // % - -Remove the Windows ^M - when the encodings gets messed up: - - noremap m mmHmt:%s///ge'tzt'm - -Quickly open a buffer for scripbble: - - map q :e ~/buffer - -Toggle paste mode on and off: - - map pp :setlocal paste! - - -### Insert mode mappings - -Quickly insert parenthesis/brackets/etc.: - - inoremap $1 ()i - inoremap $2 []i - inoremap $3 {}i - inoremap $4 {o}O - inoremap $q ''i - inoremap $e ""i - inoremap $t <>i - -Insert the current date and time (useful for timestamps): - - iab xdate =strftime("%d/%m/%y %H:%M:%S") - - -### Visual mode mappings - -Visual mode pressing `*` or `#` searches for the current selection: - - vnoremap * :call VisualSelection('f') - vnoremap # :call VisualSelection('b') - -When you press gv you vimgrep after the selected text: - - vnoremap gv :call VisualSelection('gv') - -When you press `r` you can search and replace the selected text: - - vnoremap r :call VisualSelection('replace') - -Surround the visual selection in parenthesis/brackets/etc.: - - vnoremap $1 `>a)` - vnoremap $2 `>a]` - vnoremap $3 `>a}` - vnoremap $$ `>a"` - vnoremap $q `>a'` - vnoremap $e `>a"` - - -### Command line mappings - -$q is super useful when browsing on the command line. It deletes everything until the last slash: - - cno $q eDeleteTillSlash() - -Bash like keys for the command line: - - cnoremap - cnoremap - cnoremap - - cnoremap - cnoremap - -Write the file as sudo (only on Unix). Super useful when you open a file and you don't have permissions to save your changes. [Vim tip](http://vim.wikia.com/wiki/Su-write): - - :W - - -### Spell checking -Pressing `ss` will toggle and untoggle spell checking - - map ss :setlocal spell! - -Shortcuts using `` instead of special chars - - map sn ]s - map sp [s - map sa zg - map s? z= - -### Cope -Do :help cope if you are unsure what cope is. It's super useful! - -When you search with vimgrep, display your results in cope by doing: -`cc` - -To go to the next search result do: -`n` - -To go to the previous search results do: -`p` - -Vimscript mappings: - - map cc :botright cope - map co ggVGy:tabnew:set syntax=qfpgg - map n :cn - map p :cp - -## How to uninstall -Do following: -* Remove `~/.vim_runtime` -* Remove any lines that refernce `.vim_runtime` in your `~/.vimrc` +## Cómo desinstalar +* Borrar `~/.vim_runtime` +* Borrar cualquier línea que haga referencia a `.vim_runtime` en tu archivo `~/.vimrc` diff --git a/install_awesome_vimrc.sh b/instalación.sh similarity index 80% rename from install_awesome_vimrc.sh rename to instalación.sh index e8330afc..e1b2c0f8 100644 --- a/install_awesome_vimrc.sh +++ b/instalación.sh @@ -12,4 +12,4 @@ source ~/.vim_runtime/my_configs.vim catch endtry' > ~/.vimrc -echo "Installed the Ultimate Vim configuration successfully! Enjoy :-)" +echo "Instalación finalizada!" diff --git a/install_basic_vimrc.sh b/install_basic_vimrc.sh deleted file mode 100644 index 3478144d..00000000 --- a/install_basic_vimrc.sh +++ /dev/null @@ -1,3 +0,0 @@ -cd ~/.vim_runtime -cat ~/.vim_runtime/vimrcs/basic.vim > ~/.vimrc -echo "Installed the Basic Vim configuration successfully! Enjoy :-)" diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 837469f7..7e98cfb8 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -1,28 +1,9 @@ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Maintainer: -" Amir Salihefendic -" http://amix.dk - amix@amix.dk +" Mantenimiento: +" Facundo Laffont +" facundolaffont@gmail.com " -" Version: -" 5.0 - 29/05/12 15:43:36 -" -" Blog_post: -" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github -" -" Awesome_version: -" Get this config, nice color schemes and lots of plugins! -" -" Install the awesome version from: -" -" https://github.com/amix/vimrc -" -" Syntax_highlighted: -" http://amix.dk/vim/vimrc.html -" -" Raw_version: -" http://amix.dk/vim/vimrc.txt -" -" Sections: +" Secciones: " -> General " -> VIM user interface " -> Colors and Fonts @@ -41,131 +22,121 @@ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => General +" => general """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Sets how many lines of history VIM has to remember + +" Cuántas líneas de historia debe recordar Vim set history=500 -" Enable filetype plugins +" Habilita la carga de archivos de plugins/indent según el tipo de archivo que se está utilizando filetype plugin on filetype indent on -" Set to auto read when a file is changed from the outside +" Cuando el archivo es modificado desde afuera de Vim, se vuelve a cargar set autoread -" With a map leader it's possible to do extra key combinations -" like w saves the current file +" Se va a utilizar el mapleader para generar combinaciones de tecla extra let mapleader = "," let g:mapleader = "," -" Fast saving +" guardado rápido nmap w :w! -" :W sudo saves the file -" (useful for handling the permission-denied error) +" +" :W sudo saves the file (useful for handling the permission-denied error) command W w !sudo tee % > /dev/null """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => VIM user interface +" => interfaz de usuario de Vim """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Set 7 lines to the cursor - when moving vertically using j/k -set so=7 -" Avoid garbled characters in Chinese language windows OS -let $LANG='en' -set langmenu=en -source $VIMRUNTIME/delmenu.vim -source $VIMRUNTIME/menu.vim +" deja un espacio de 5 líneas entre el curso y el borde superior o inferior +set so=5 -" Turn on the WiLd menu +" activa el menú Wild set wildmenu -" Ignore compiled files -set wildignore=*.o,*~,*.pyc -if has("win16") || has("win32") - set wildignore+=.git\*,.hg\*,.svn\* -else - set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store -endif +" ignora los archivos de compilación (útil para git) +set wildignore=*.o,*~,*.pyc,*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store -"Always show current position +" siempre muestra la posición del cursor set ruler -" Height of the command bar +" altura de la línea de comandos set cmdheight=2 +" " A buffer becomes hidden when it is abandoned set hid -" Configure backspace so it acts as it should act +" configura backspace, los comandos h y l, y los movimientos con las flechas para que el cursor +" responda como normalmente lo hace fuera de Vim, cuando se está al principio o final de la línea set backspace=eol,start,indent set whichwrap+=<,>,h,l -" Ignore case when searching +" ignora la sensibilidad de las mayúsculas cuando se está buscando set ignorecase -" When searching try to be smart about cases +" realiza búsquedas inteligentes en cuanto a la sensibilidad de las mayúsculas set smartcase -" Highlight search results +" resalta los resultados de las búsquedas set hlsearch -" Makes search act like search in modern browsers +" hace que la búsqueda actúe como en los navegadores web modernos set incsearch -" Don't redraw while executing macros (good performance config) +" no redibuja cuando se ejecutan macros (buena performance) set lazyredraw -" For regular expressions turn magic on +" activa magic para las expresiones regulares set magic -" Show matching brackets when text indicator is over them +" muestra el paréntesis opuesto cuando el cursor está sobre uno set showmatch -" How many tenths of a second to blink when matching brackets + +" cuántas decenas de segundos tarda en parpadear el cursor cuando se indica el paréntesis opuesto set mat=2 -" No annoying sound on errors +" quita el sonido y el flash en los errores set noerrorbells set novisualbell set t_vb= set tm=500 -" Add a bit extra margin to the left +" agrega un poco de margen a la izquierda set foldcolumn=1 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Colors and Fonts +" => colores y fuentes tipográficas """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Enable syntax highlighting + +" habilita el resaltado según sintaxis syntax enable +" intenta utilizar el esquema de color desert try colorscheme desert catch endtry +" si el color de fondo es un color oscuro, Vim utiliza colores que contrasten mejor con ese tipo de +" color de fondo set background=dark -" Set extra options when running in GUI mode -if has("gui_running") - set guioptions-=T - set guioptions-=e - set t_Co=256 - set guitablabel=%M\ %t -endif - -" Set utf8 as standard encoding and en_US as the standard language +" establece utf8 como la codificación estándar set encoding=utf8 -" Use Unix as the standard file type -set ffs=unix,dos,mac +" utiliza Unix como tipo de archivo estándar +set ffs=unix,mac,dos """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Files, backups and undo +" => archivos, back-ups y deshacer """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " Turn backup off, since most stuff is in SVN, git et.c anyway... set nobackup set nowb @@ -173,122 +144,120 @@ set noswapfile """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Text, tab and indent related +" => texto, tabulación e indentación """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Use spaces instead of tabs +" usa espacios en vez de tabulación set expandtab -" Be smart when using tabs ;) +" usa las tabulaciones de manera inteligente set smarttab -" 1 tab == 4 spaces +" 1 tabulación == 4 espacios set shiftwidth=4 set tabstop=4 -" Linebreak on 500 characters +" el quiebre de línea se realiza a los 100 caracteres set lbr -set tw=500 +set tw=100 -set ai "Auto indent -set si "Smart indent -set wrap "Wrap lines +" establece autoindentación, indentación inteligente y quiebre de líneas +set ai +set si +set wrap -"""""""""""""""""""""""""""""" -" => Visual mode related -"""""""""""""""""""""""""""""" -" Visual mode pressing * or # searches for the current selection -" Super useful! From an idea by Michael Naumann +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => relacionado con el modo visual +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" en modo Visual, presionando * o ¿, busca la selección actual vnoremap * :call VisualSelection('', '')/=@/ -vnoremap # :call VisualSelection('', '')?=@/ +vnoremap ¿ :call VisualSelection('', '')?=@/ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Moving around, tabs, windows and buffers +" => sobre movimiento, pestañas, ventanas y buffers """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Map to / (search) and Ctrl- to ? (backwards search) + +" mapeos de búsqueda map / -map ? +" <¿>no funciona +map ? -" Disable highlight when is pressed +" deshabilita el resaltado de las búsquedas map :noh -" Smart way to move between windows +" movimiento entre ventanas map j map k map h map l -" Close the current buffer +" cierra el buffer actual map bd :Bclose:tabclosegT -" Close all the buffers +" cierra todos los buffers map ba :bufdo bd +" navegación entre buffers map l :bnext map h :bprevious -" Useful mappings for managing tabs +" navegación entre pestañas map tn :tabnew map to :tabonly map tc :tabclose map tm :tabmove -map t :tabnext +map t :tabnext -" Let 'tl' toggle between this and the last accessed tab +" 'tl' salta entre la pestaña actual y la última a la que se accedió let g:lasttab = 1 nmap tl :exe "tabn ".g:lasttab au TabLeave * let g:lasttab = tabpagenr() +" abre una nueva pestaña con la ruta del buffer actual +map te :tabedit =expand("%:p:h")/ -" Opens a new tab with the current buffer's path -" Super useful when editing files in the same directory -map te :tabedit =expand("%:p:h")/ - +" <¿?> " Switch CWD to the directory of the open buffer map cd :cd %:p:h:pwd -" Specify the behavior when switching between buffers +" especifica el comportamiento cuando se cambia de buffer try set switchbuf=useopen,usetab,newtab set stal=2 catch endtry -" Return to last edit position when opening files (You want this!) +" al abrir un archivo, vuelve al mismo punto donde se dejó cuando se cerró au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif -"""""""""""""""""""""""""""""" -" => Status line -"""""""""""""""""""""""""""""" -" Always show the status line +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => línea de estado +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" siempre muestra la línea de estado set laststatus=2 -" Format the status line +" formateo de la línea de estado set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Editing mappings +" => mapeos para edición """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Remap VIM 0 to first non-blank character +" remapea '0' para que posicione el cursor en el primer carácter no blanco map 0 ^ -" Move a line of text using ALT+[jk] or Command+[jk] on mac -nmap mz:m+`z -nmap mz:m-2`z -vmap :m'>+`mzgv`yo`z -vmap :m'<-2`>my`no funciona correctamente +" mueve una línea de texto hacia arriba o hacia abajo +nmap mz:m+`z +nmap mz:m-2`z +vmap :m'>+`mzgv`yo`z +vmap :m'<-2`>my` - nmap - vmap - vmap -endif - -" Delete trailing white space on save, useful for Python and CoffeeScript ;) +" borra los espacios sobrantes al final de la línea, cuando se guarda el buffer func! DeleteTrailingWS() exe "normal mz" %s/\s\+$//ge @@ -297,11 +266,12 @@ endfunc autocmd BufWrite *.py :call DeleteTrailingWS() autocmd BufWrite *.coffee :call DeleteTrailingWS() - +" <¿>falta chequear toda esta sección """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Ag searching and cope displaying " requires ag.vim - it's much better than vimgrep/grep """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " When you press gv you Ag after the selected text vnoremap gv :call VisualSelection('gv', '') @@ -329,12 +299,13 @@ map p :cp """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Spell checking +" => chequeo de gramática """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Pressing ,ss will toggle and untoggle spell checking + +" activa o desactiva el chequeo de gramática map ss :setlocal spell! -" Shortcuts using +" atajos para herramientas de la gramática map sn ]s map sp [s map sa zg @@ -342,36 +313,46 @@ map s? z= """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Misc +" => misceláneo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Remove the Windows ^M - when the encodings gets messed up + +" quita los caracteres ^M de windows cuando las codificaciones de texto se mezclan noremap m mmHmt:%s///ge'tzt'm -" Quickly open a buffer for scribble +" abre un buffer sin nombre map q :e ~/buffer -" Quickly open a markdown buffer for scribble +" abre un buffer sin nombre, de tipo Markdown map x :e ~/buffer.md -" Toggle paste mode on and off +" activa o desactiva el modo paste map pp :setlocal paste! - - """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Helper functions +" => sección de definición de funciones """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" ejecuta la acción 'str' como dentro de un menú gráfico function! CmdLine(str) + " crea un menu 'Foo' con un submenú 'Bar' que ejecuta el comando str exe "menu Foo.Bar :" . a:str + + " ejecuta el menú Foo.Bar emenu Foo.Bar + + " borra el menú Foo y todo su contenido unmenu Foo endfunction function! VisualSelection(direction, extra_filter) range + " definición let l:saved_reg = @" + + " execute "normal! vgvy" + let l:pattern = escape(@", '\\/.*$^~[]') let l:pattern = substitute(l:pattern, "\n$", "", "") @@ -385,8 +366,7 @@ function! VisualSelection(direction, extra_filter) range let @" = l:saved_reg endfunction - -" Returns true if paste mode is enabled +" devuelve true si el modo paste está activado function! HasPaste() if &paste return 'PASTE MODE ' @@ -394,8 +374,9 @@ function! HasPaste() return '' endfunction -" Don't close window, when deleting a buffer +" redefine el comando Bclose command! Bclose call BufcloseCloseIt() +" no cierra la ventana cuando se borra un buffer function! BufcloseCloseIt() let l:currentBufNum = bufnr("%") let l:alternateBufNum = bufnr("#") @@ -415,6 +396,7 @@ function! BufcloseCloseIt() endif endfunction +" " Make VIM remember position in file after reopen " if has("autocmd") " au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif