Add user42 and mail42 support thanks to @xbeheydt
This commit is contained in:
27
README.md
27
README.md
@@ -31,8 +31,8 @@ USER="marvin" ./set_header.sh
|
||||
|
||||
If you want to setup the same email and username for all your git:
|
||||
```
|
||||
git config --global user.name gbaconni
|
||||
git config --global user.email gbaconni@student.42lausanne.ch
|
||||
git config --global user.name marvin
|
||||
git config --global user.email marvin@student.42lausanne.ch
|
||||
```
|
||||
|
||||
Otherwise setup it on a case-by-case basic:
|
||||
@@ -43,6 +43,14 @@ git config user.name "marvin"
|
||||
git config user.email "marvin@student.42lausanne.ch"
|
||||
```
|
||||
|
||||
For non git-based folder, set user and mail values directly in your vimrc
|
||||
```vim
|
||||
vim ~/.vimrc
|
||||
let g:user42 = 'marvin'
|
||||
let g:mail42 = 'marvin@student.42lausanne.ch'
|
||||
```
|
||||
<kbd>ESC</kbd> `:wq`
|
||||
|
||||
### **Manual Setup**
|
||||
|
||||
Below replace "marvin" with your 42 Network login.
|
||||
@@ -55,8 +63,8 @@ cp -va vim/stdheader.vim ~/.vim/plugin
|
||||
|
||||
If you want to setup the same email and username for all your git:
|
||||
```
|
||||
git config --global user.name gbaconni
|
||||
git config --global user.email gbaconni@student.42lausanne.ch
|
||||
git config --global user.name marvin
|
||||
git config --global user.email marvin@student.42lausanne.ch
|
||||
```
|
||||
|
||||
Otherwise setup it on a case-by-case basic:
|
||||
@@ -87,7 +95,7 @@ source ~/.bashrc
|
||||
|
||||
- Your git username and email will always have the priority over $USER and $MAIL variables.
|
||||
- If you are outside a git repo tree, it will use the $USER and $MAIL environement variables.
|
||||
- I none of the above, it will default to marvin@student.42lausanne.ch and marvin as username.
|
||||
- If none of the above, it will default to marvin@student.42lausanne.ch and marvin as username.
|
||||
- Usually you don't want to overwrite $USER as is the logged user and is already defined.
|
||||
|
||||
Troubleshooting:
|
||||
@@ -112,9 +120,18 @@ The location of the official stdheader.vim in 42lausanne's clusters:
|
||||
|
||||
- [@42Paris](https://github.com/42Paris)
|
||||
- [@zazard](https://github.com/zazard)
|
||||
- [@xbeheydt](https://github.com/xbeheydt)
|
||||
|
||||
### **Bonus**
|
||||
|
||||
- 42 Vim Headerguard [42-vim-headerguard](https://github.com/xbeheydt/42-vim-headerguard)
|
||||
```
|
||||
test -d ~/.vim/plugin || mkdir -p ~/.vim/plugin
|
||||
git clone https://github.com/xbeheydt/42-vim-headerguard.git 42-vim-headerguard
|
||||
cd 42-vim-headerguard
|
||||
cp -va plugin/* ~/.vim/plugin/
|
||||
```
|
||||
|
||||
- Swissair is gone? Have a look to [Airline](https://github.com/vim-airline/vim-airline) for a nice status for vim.
|
||||
```
|
||||
test -d ~/.vim/plugin || mkdir -p ~/.vim/plugin
|
||||
|
||||
Reference in New Issue
Block a user