From 1315d5054e5fe28981939bd9d646af22b4deb7ff Mon Sep 17 00:00:00 2001 From: amix Date: Wed, 30 May 2012 12:31:10 -0400 Subject: [PATCH] Fixed some typos in readme. Making it ready to be used on Windows as well --- README.md | 39 +++++++++++++++++++++++---------------- install_awesome_vimrc.sh | 7 ++++--- vimrcs/basic.vim | 17 ++++++++++++----- vimrcs/plugins_config.vim | 4 ++-- 4 files changed, 41 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 0bcd2b98..8cb51da6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This is useful to install on remote servers where you don't need many plugins an git clone git://github.com/amix/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_basic_vimrc.sh - + ## 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: @@ -26,6 +26,11 @@ The awesome version includes a lot of great plugins, configurations and color sc sh ~/.vim_runtime/install_awesome_vimrc.sh +## How to install on Windows + + + + ## Some screenshots Colors when editing a Python file: @@ -36,9 +41,9 @@ Opening recently opened files [mru.vim](https://github.com/vim-scripts/mru.vim): ![Screenshot 2](http://files1.wedoist.com/1967b0e48af40e513d1a464e08196990/as/screenshot_2.png) -Seeing opened buffers [bufexplorer.zip](https://github.com/vim-scripts/bufexplorer.zip): +[NERD Tree](https://github.com/scrooloose/nerdtree) plugin in a terminal window: -![Screenshot 3](http://files1.wedoist.com/88eeb6ff36cf88d062e73c87af482d9c/as/screenshot_3.png ) +![Screenshot 3](http://files1.wedoist.com/b1509d7ed9e9f357e8d04797f9fad67b/as/screenshot3.png) ## What plugins are included? @@ -93,23 +98,23 @@ Now you have vim-rails installed ;-) ### Plugin related mappings -Open bufexplorer and see and manage the current buffers: +Open [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) and see and manage the current buffers: map o :BufExplorer -Open MRU.vim and see the recently open files: +Open [MRU.vim](https://github.com/vim-scripts/mru.vim) and see the recently open files: map f :MRU -Open ctrlp.vim plugin: +Open [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin: let g:ctrlp_map = '' -Open peepopen plugin: +Open [PeepOpen](https://peepcode.com/products/peepopen) plugin: map j :PeepOpen -NERDTree: +Managing the [NERD Tree](https://github.com/scrooloose/nerdtree) plugin: map nn :NERDTreeToggle map nb :NERDTreeFromBookmark @@ -125,7 +130,7 @@ Treat long lines as break lines (useful when moving around in them): map j gj map k gk -Map to / (search) and Ctrl- to ? (backwards search): +Map `` to `/` (search) and `+` to `?` (backwards search): map / map ? @@ -205,7 +210,7 @@ Insert the current date and time (useful for timestamps): ### Visual mode mappings -Visual mode pressing * or # searches for the current selection: +Visual mode pressing `*` or `#` searches for the current selection: vnoremap * :call VisualSelection('f') vnoremap # :call VisualSelection('b') @@ -230,11 +235,11 @@ Surround the visual selection in parenthesis/brackets/etc.: ### Command line mappings -$q is super useful when browsing on the command line. It deletes everything until the last slash. +$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 +Bash like keys for the command line: cnoremap cnoremap @@ -249,7 +254,7 @@ Pressing `ss` will toggle and untoggle spell checking map ss :setlocal spell! -Shortcuts using instead of special chars +Shortcuts using `` instead of special chars map sn ]s map sp [s @@ -260,13 +265,15 @@ Shortcuts using instead of special chars 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` +`cc` To go to the next search result do: -* `n` +`n` To go to the previous search results do: -* `p` +`p` + +Vimscript mappings: map cc :botright cope map co ggVGy:tabnew:set syntax=qfpgg diff --git a/install_awesome_vimrc.sh b/install_awesome_vimrc.sh index ac53f037..24566219 100644 --- a/install_awesome_vimrc.sh +++ b/install_awesome_vimrc.sh @@ -9,8 +9,9 @@ source ~/.vim_runtime/vimrcs/filetypes.vim source ~/.vim_runtime/vimrcs/plugins_config.vim source ~/.vim_runtime/vimrcs/extended.vim -if filereadable("~/.vim_runtime/vimrcs/my_configs.vim") -source ~/.vim_runtime/vimrcs/my_configs.vim -endif' > ~/.vimrc +try +source ~/.vim_runtime/my_configs.vim +catch +endtry' > ~/.vimrc echo "Installed the Ultimate Vim configuration successfully! Enjoy :-)" diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index ea460665..dd07cbef 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -9,16 +9,19 @@ " 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 " -" Awesome_version: -" Get this config, nice color schemes and lots of plugins! -" https://github.com/amix/vimrc -" " Sections: " -> General " -> VIM user interface @@ -120,7 +123,11 @@ set tm=500 " Enable syntax highlighting syntax enable -colorscheme desert +try + colorscheme desert +catch +endtry + set background=dark " Set extra options when running in GUI mode diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index 59a5c993..26c089b3 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -35,9 +35,9 @@ map f :MRU " => YankRing """""""""""""""""""""""""""""" if has("win16") || has("win32") - let g:yankring_history_dir = '~/_vim_runtime/temp_dirs/' + let g:yankring_history_dir = 'C:\Windows\temp\yank_vim_dir' else - let g:yankring_history_dir = '~/.vim_runtime/temp_dirs/' + let g:yankring_history_dir = '~/.vim_runtime/temp_dirs/' endif