Skip to content

Commit

Permalink
Merge branch 'master' of github.com:amix/vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
amix committed Mar 31, 2018
2 parents 02572ca + afa5122 commit 66472a2
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 7 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@ I would, of course, recommend using the awesome version.


## How to install the Awesome version?

### Install for your own user only
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 from your terminal:

git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh

### Install for multiple users
To install for multiple users, the repository needs to be cloned to a location accessible for all the intended users.

git clone --depth=1 https://github.com/amix/vimrc.git /opt/vim_runtime
sh ~/.vim_runtime/install_awesome_parameterized.sh /opt/vim_runtime user0 user1 user2
# to install for all users with home directories
sh ~/.vim_runtime/install_awesome_parameterized.sh /opt/vim_runtime --all

Naturally, `/opt/vim_runtime` can be any directory, as long as all the users specified have read access.

## Fonts

Expand All @@ -29,7 +38,6 @@ Some other fonts that Awesome will try to use:
* [Hack](http://sourcefoundry.org/hack/)
* [Source Code Pro](https://adobe-fonts.github.io/source-code-pro/)


## How to install the Basic version?

The basic version is just one file and no plugins. Just copy [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim) and paste it into your vimrc.
Expand Down
41 changes: 41 additions & 0 deletions install_awesome_parameterized.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash
set -e

echo 'Installing Awesome Vim from '$1
cd $1

VIMRC="set runtimepath+=$1
source $1/vimrcs/basic.vim
source $1/vimrcs/filetypes.vim
source $1/vimrcs/plugins_config.vim
source $1/vimrcs/extended.vim
try
source $1/my_configs.vim
catch
endtry"

if [ $2 == "--all" ]; then
USERS=($(ls -l /home | awk '{if(NR>1)print $9}'))
for user in ${USERS[*]}; do
homepath=$(eval echo "~$user")
IFS=''
echo $VIMRC > ${homepath}/.vimrc
unset IFS
echo "Installed the Ultimate Vim configuration for user $user successfully! Enjoy :-)"
done
echo "Installed the Ultimate Vim configuration successfully! Enjoy :-)"
exit 0
else
SELECTED_USERS=(${@:2})
echo "Selected users: ${SELECTED_USERS[@]}"
for user in ${SELECTED_USERS[@]}; do
homepath=$(eval echo "~$user")
IFS=''
echo $VIMRC > ${homepath}/.vimrc
unset IFS
echo "Installed the Ultimate Vim configuration for user $user successfully! Enjoy :-)"
done
exit 0
fi
2 changes: 1 addition & 1 deletion update_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def download_extract_replace(plugin_name, zip_path, temp_dir, source_dir):
pass

shutil.move(plugin_temp_path, plugin_dest_path)

print(zip_path)
print('Updated {0}'.format(plugin_name))


Expand Down
3 changes: 1 addition & 2 deletions vimrcs/basic.vim
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ set autoread
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","

" Fast saving
nmap <leader>w :w!<cr>
Expand All @@ -78,7 +77,7 @@ set langmenu=en
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim

" Turn on the WiLd menu
" Turn on the Wild menu
set wildmenu

" Ignore compiled files
Expand Down

0 comments on commit 66472a2

Please sign in to comment.