With this guide, you can install the Norminette, 42 Header, and access your 42 repositories on your Mac.
Remote study shouldn't replace going onto campus. Use this to get some extra study in or when coming into 42 isn't an option. ☺︎
Terminal
SSH key
Norminette
42 Header
Vimrc Configurations (Optional)
For this step, you can use your preferred Terminal emulator. Your Mac will have the Terminal app installed, however at 42 iTerm is used. iTerm Download
You will need to generate an SSH key to access Vogsphere for your Git repositories.
To generate a public and private key use ssh-keygen
in your chosen terminal.
Press enter when asked to enter a file to save the key in, and follow the password prompts.
Use cat ~/.ssh/id_rsa.pub
to view your generated key.
Copy the key as you’ll need it for the next steps.
In your intra settings go to SSH key and select New SSH key, paste in your key and give it a name. After saving, you can access your 42 Vogsphere repositories.
You can use this same key later on in the guide if you would prefer to use SSH on Github.
To install the Norminette visit the link and follow the installation instructions. You'll need Python for this but your Mac should have it installed. To check you have the correct version of Python use Python --version
.
Norminette on Github
You can install the 42 header for both VIM and Visual Studio code, if you are in the Piscine it’s recommended to keep using Vim.
For the 42 header files visit the link. 42 Header on Github
Click the button to clone the repository or to download the ZIP.
Once the files are on your Mac you can use your terminal or Mac graphical interface to navigate them.
Inside the 42 header folder go into the plugin directory, it will have the stdheader.vim file inside. If you're not using your own plugin manager use cp stdheader.vim ~/.vim/plugin
. This will copy the file into the /.vim/plugin directory.
Inside the 42 header folder go into the plugin directory, it will have the stdheader.vim file inside. If you're not using your own plugin manager you can copy this file into the /.vim/plugin path by going to the menu bar and clicking Finder > Go > Go to Folder… type in “~/.vim/plugin” when prompted and paste a copy of stdheader.vim inside.
Use cd ~
to get back to your home directory then type vim .vimrc
. This file may already exist and have text inside. If it does add these configurations at the top or bottom of the file. Change intraname to your intra login name, and leave the email as it is.
let g:user42 = 'intraname'
let g:mail42 = '[email protected]'
Save and quit Vim.
Use the link to install the 42 header extension in Visual Studio Code, in the extension settings change the username to your intra login name and use [email protected] as the email. 42 Header Extension
You can edit the .vimrc file from earlier to add Vim configurations, these configurations will give Vim similar settings to the 42 computers without having to apply them each time.
syntax on
set number
set ruler
set showmatch
set smartindent
set autoindent
set mouse=a
Your .vimrc file might look a bit like this:
Your Mac is now ready for remote study!