42 (Paris)
42 standard header for vim and neovim editors.
-
Install Lazy.nvim if not already installed.
-
Clone this repository into your Neovim plugins directory:
git clone https://github.com/42paris/42header ~/.config/nvim/lua/plugins/42header- Modify your Neovim config file (e.g.,
~/.config/nvim/lua/config/init.lua) to add the plugin to your Lazy setup:
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
{ import = "plugins" },
-- START the 42header plugin here.
{
dir = vim.fn.stdpath("config") .. "/lua/plugins/42header",
name = "42header",
config = function()
-- Try loading without setup() first.
local ok, plugin = pcall(require, "42header")
if not ok then
vim.notify("Erro while loading 42header: " .. plugin, vim.log.levels.ERROR)
else
-- Call setup() only if it exists.
if plugin.setup then
plugin.setup()
end
end
end,
},
-- END the 42header plugin here.
},
})- Set the user and mail variables in your Neovim config (e.g.,
~/.config/nvim/init.lua):
vim.g.user42 = 'yourLogin'
vim.g.mail42 = 'yourLogin@student.42.fr'Copy stdheader.vim in your ~/.vim/plugin, or use your favorite plugin
manager. Then set the user and mail variables as explained below.
Add in ~/.zshrc your:
USERMAIL
let g:user42 = 'yourLogin'
let g:mail42 = 'yourLogin@student.42.fr'In NORMAL mode you can use :Stdheader or simply press the shortcut F1.
Under Linux you eventually need to disable the help shortcut of your terminal :
For Terminator, right click -> Preferences -> Shortcuts -> change help with something other than F1
Inside the 42 clusters you can easily run:
$ ./set_header.sh
@zazard - creator @alexandregv - contributor @mjacq42 - contributor @sungmcho - contributor @fclivaz42 - contributor
This work is published under the terms of 42 Unlicense.
