From ec0252961571b71415b64484604a9b7c911bf936 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Mon, 14 Dec 2020 19:11:20 +0200 Subject: [PATCH] Initial configuration converted to lua Still many missing plugins and configurations --- config.yaml | 41 ++---- home/.config/nvim/coc-settings.json | 33 ----- home/.config/nvim/conf.d/01-plugins.vim | 95 -------------- home/.config/nvim/conf.d/02-appearance.vim | 46 ------- home/.config/nvim/conf.d/03-keybinds.vim | 39 ------ home/.config/nvim/conf.d/04-coc.vim | 129 ------------------- home/.config/nvim/conf.d/05-language.vim | 12 -- home/.config/nvim/conf.d/06-misc.vim | 41 ------ home/.config/nvim/conf.d/07-fzf.vim | 43 ------- home/.config/nvim/init.lua | 9 ++ home/.config/nvim/init.vim | 3 - home/.config/nvim/lua/autocmd.lua | 4 + home/.config/nvim/lua/keybinds.lua | 10 ++ home/.config/nvim/lua/pluginmanager.lua | 46 +++++++ home/.config/nvim/lua/plugins/airline.lua | 10 ++ home/.config/nvim/lua/plugins/completion.lua | 1 + home/.config/nvim/lua/plugins/lsp.lua | 3 + home/.config/nvim/lua/plugins/nerdtree.lua | 0 home/.config/nvim/lua/settings.lua | 44 +++++++ 19 files changed, 137 insertions(+), 472 deletions(-) delete mode 100644 home/.config/nvim/coc-settings.json delete mode 100644 home/.config/nvim/conf.d/01-plugins.vim delete mode 100644 home/.config/nvim/conf.d/02-appearance.vim delete mode 100644 home/.config/nvim/conf.d/03-keybinds.vim delete mode 100644 home/.config/nvim/conf.d/04-coc.vim delete mode 100644 home/.config/nvim/conf.d/05-language.vim delete mode 100644 home/.config/nvim/conf.d/06-misc.vim delete mode 100644 home/.config/nvim/conf.d/07-fzf.vim create mode 100644 home/.config/nvim/init.lua delete mode 100644 home/.config/nvim/init.vim create mode 100644 home/.config/nvim/lua/autocmd.lua create mode 100644 home/.config/nvim/lua/keybinds.lua create mode 100644 home/.config/nvim/lua/pluginmanager.lua create mode 100644 home/.config/nvim/lua/plugins/airline.lua create mode 100644 home/.config/nvim/lua/plugins/completion.lua create mode 100644 home/.config/nvim/lua/plugins/lsp.lua create mode 100644 home/.config/nvim/lua/plugins/nerdtree.lua create mode 100644 home/.config/nvim/lua/settings.lua diff --git a/config.yaml b/config.yaml index adbd2326..f34bbec1 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,3 @@ -actions: - vim-plug: nvim +PlugInstall +qall config: backup: true banner: true @@ -25,20 +23,15 @@ dotfiles: d_imapnotify: dst: ~/.config/imapnotify src: .config/imapnotify - f_init.vim: - dst: ~/.config/nvim/init.vim - src: .config/nvim/init.vim - d_nvim_config: - actions: - - vim-plug - dst: ~/.config/nvim/conf.d - src: .config/nvim/conf.d + f_nvim_init: + dst: ~/.config/nvim/init.lua + src: .config/nvim/init.lua + d_nvim_lua: + dst: ~/.config/nvim/lua + src: .config/nvim/lua f_user-dirs.dirs: dst: ~/.config/user-dirs.dirs src: .config/user-dirs.dirs - f_coc-settings.json: - dst: ~/.config/nvim/coc-settings.json - src: .config/nvim/coc-settings.json d_sway: dst: ~/.config/sway src: .config/sway @@ -177,9 +170,8 @@ profiles: - f_ranger.conf - f_ssh.conf - f_authorized_keys - - d_nvim_config - - f_init.vim - - f_coc-settings.json + - d_nvim_lua + - f_nvim_init - f_gitconfig - f_alacritty.yml email: @@ -239,21 +231,8 @@ profiles: - terminal - Pacman mko-laptop: - dotfiles: - - f_nvimpager - - f_hushlogin - - f_ripgrep_ignore - - f_ranger_commands.py - - f_rtv.cfg - - f_mailcap - - d_zsh - - f_zshrc - - f_tmux.conf - - f_ranger.conf - - d_nvim_config - - f_init.vim - - f_coc-settings.json - - f_alacritty.yml + include: + - terminal AnittaPC: include: - terminal diff --git a/home/.config/nvim/coc-settings.json b/home/.config/nvim/coc-settings.json deleted file mode 100644 index eddd81b5..00000000 --- a/home/.config/nvim/coc-settings.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "python.jediEnabled": false, - "suggest.noselect": false, - "suggest.echodocSupport": true, - "suggest.maxCompleteItemCount": 20, - "coc.preferences.formatOnSaveFiletypes": [], - "prettier.singleQuote": false, - "diagnostic.errorSign": "•", - "diagnostic.warningSign": "•", - "diagnostic.infoSign": "•", - "suggest.snippetIndicator": "~", - "rust-analyzer.serverPath": "/usr/bin/rust-analyzer", - "languageserver": { - "bash": { - "command": "bash-language-server", - "args": ["start"], - "filetypes": ["sh"], - "ignoredRootPaths": ["~"] - }, - "xml": { - "command": "xml-language-server", - "args": ["start"], - "filetypes": ["xml"], - "ignoredRootPaths": ["~"] - } - }, - "markdownlint.config": { - "rules": { - "default": true, - "line_length": false - } - } -} diff --git a/home/.config/nvim/conf.d/01-plugins.vim b/home/.config/nvim/conf.d/01-plugins.vim deleted file mode 100644 index 690629e2..00000000 --- a/home/.config/nvim/conf.d/01-plugins.vim +++ /dev/null @@ -1,95 +0,0 @@ -" Auto-install vim-plug -if empty(glob('~/.config/nvim/autoload/plug.vim')) - silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall -endif - -" Set coc extensions -let g:coc_global_extensions = [ - \ 'coc-tsserver', - \ 'coc-html', - \ 'coc-tsserver', - \ 'coc-json', - \ 'coc-yaml', - \ 'coc-texlab', - \ 'coc-prettier', - \ 'coc-python', - \ 'coc-emmet', - \ 'coc-rust-analyzer', - \ 'coc-markdownlint', - \ 'coc-snippets', - \ 'coc-java' - \ ] - -call plug#begin() - -" statusline/tabline -Plug 'vim-airline/vim-airline' - -" Make editing passwords safer -Plug 'https://git.zx2c4.com/password-store', { 'rtp': 'contrib/vim/redact_pass.vim' } - -" Colorize color words -Plug 'norcalli/nvim-colorizer.lua' - -" NeoVim in Firefox -Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } - -" Spelling -Plug 'vim-scripts/Vimchant' - -" Pandoc plugins -Plug 'vim-pandoc/vim-pandoc' -Plug 'conornewton/vim-pandoc-markdown-preview' - -" Fuzzy finder -Plug 'junegunn/fzf' -Plug 'junegunn/fzf.vim' - -" Language syntax pack -Plug 'sheerun/vim-polyglot' - -" Read editorconfig settings -Plug 'editorconfig/editorconfig-vim' - -" Make directory if it doesn't exist -Plug 'pbrisbin/vim-mkdir' - -" Tree explorer -Plug 'scrooloose/nerdtree' - -" Moar snippets -Plug 'honza/vim-snippets' - -" Filetype icons -Plug 'ryanoasis/vim-devicons' - -" Surround stuff with brackets and quotes -Plug 'tpope/vim-surround' - -" Do stuff as sudo -Plug 'lambdalisue/suda.vim' - -" Conguer of Completion -Plug 'neoclide/coc.nvim', {'do': './install.sh nightly'} - -" VimL source for CoC -Plug 'Shougo/neco-vim' -Plug 'neoclide/coc-neco' - -" Git plugin -Plug 'jreybert/vimagit' - -" Git diff in gutter -Plug 'airblade/vim-gitgutter' - -" Gpg support -Plug 'jamessan/vim-gnupg' - -" Colorscheme -Plug 'joshdick/onedark.vim' - -" Latex plugin -Plug 'lervag/vimtex' - -call plug#end() diff --git a/home/.config/nvim/conf.d/02-appearance.vim b/home/.config/nvim/conf.d/02-appearance.vim deleted file mode 100644 index 955d2a24..00000000 --- a/home/.config/nvim/conf.d/02-appearance.vim +++ /dev/null @@ -1,46 +0,0 @@ -" Set colorscheme -colorscheme onedark - -" Floating window transparency -set winblend=10 - -" Enable italics -let g:onedark_terminal_italics=1 - -" Disable built-in statusline because airline shows it -set noshowmode - -" Airline -set laststatus=2 -set encoding=utf-8 -let g:airline#extensions#tabline#enabled = 1 -let g:airline_powerline_fonts = 1 -let g:airline_section_warning = '' -let g:airline_section_error = '' -let g:airline_theme='onedark' - -" True color support -set termguicolors - -" Line numbering -set relativenumber -set number - -" Always show signcolumn -set signcolumn=yes - -" Autoindent and syntax highlight -set autoindent -set smartindent -syntax on -filetype on -filetype plugin indent on -set tabstop=4 -set shiftwidth=4 - -" Make gutter and cursorline bg transparent -highlight CursorLineNr guibg=transparent -highlight SignColumn guibg=transparent - -" Don't wrap in the middle of words -set linebreak diff --git a/home/.config/nvim/conf.d/03-keybinds.vim b/home/.config/nvim/conf.d/03-keybinds.vim deleted file mode 100644 index 3f37e03a..00000000 --- a/home/.config/nvim/conf.d/03-keybinds.vim +++ /dev/null @@ -1,39 +0,0 @@ -" Change leader to space -nnoremap -let mapleader = ' ' - -" Toggle nerdtree -map :NERDTreeToggle - -" Markdown preview -nmap MarkdownPreview -nmap MarkdownPreviewStop -nmap MarkdownPreviewToggle - -set splitbelow -set splitright - -" Move between buffers -nnoremap :bn -nnoremap :bp - -" Move between splits -nnoremap -nnoremap -nnoremap -nnoremap - -" Enable mouse -set mouse=a - -" Toggle equalalways -function ToggleEqual () - :set equalalways! - :set equalalways! -endfunction - -nnoremap = :call ToggleEqual() - -" Navigate display lines insted of physical lines -nnoremap j gj -nnoremap k gk diff --git a/home/.config/nvim/conf.d/04-coc.vim b/home/.config/nvim/conf.d/04-coc.vim deleted file mode 100644 index a0424537..00000000 --- a/home/.config/nvim/conf.d/04-coc.vim +++ /dev/null @@ -1,129 +0,0 @@ -" Enable symbol highlight -autocmd CursorHold * silent call CocActionAsync('highlight') - -" If hidden is not set, TextEdit might fail. -set hidden - -" Some servers have issues with backup files, see #649 -set nobackup -set nowritebackup - -" Better display for messages -set cmdheight=2 - -" Smaller updatetime for CursorHold & CursorHoldI -set updatetime=300 - -" Don't give |ins-completion-menu| messages. -set shortmess+=c - -" Use tab for trigger completion with characters ahead and navigate. -" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to confirm snippet -inoremap pumvisible() ? coc#_select_confirm() : - \"\u\\=coc#on_enter()\" - -" Use to trigger completion. -inoremap coc#refresh() - -" Use to confirm completion, `u` means break undo chain at current position. -" Coc only does snippet and additional edit on confirm. -inoremap pumvisible() ? "\" : "\u\" - -" Use `[c` and `]c` to navigate diagnostics -nmap [c (coc-diagnostic-prev) -nmap ]c (coc-diagnostic-next) - -" Remap keys for gotos -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window -nnoremap K :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction - -" Highlight symbol under cursor on CursorHold -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Remap for rename current word -nmap rn (coc-rename) - -" Remap for format selected region -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Remap for do codeAction of selected region, ex: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap for do codeAction of current line -nmap ac (coc-codeaction) -" Fix autofix problem of current line -nmap qf (coc-fix-current) - -" Use `:Format` to format current buffer -command! -nargs=0 Format :call CocAction('format') - -" Use `:Fold` to fold current buffer -command! -nargs=? Fold :call CocAction('fold', ) - - -" Add diagnostic info for https://github.com/itchyny/lightline.vim -let g:lightline = { - \ 'colorscheme': 'wombat', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'cocstatus', 'readonly', 'filename', 'modified' ] ] - \ }, - \ 'component_function': { - \ 'cocstatus': 'coc#status' - \ }, - \ } - - - -" Using CocList -" Show all diagnostics -nnoremap a :CocList diagnostics -" Manage extensions -nnoremap e :CocList extensions -" Show commands -nnoremap c :CocList commands -" Find symbol of current document -nnoremap o :CocList outline -" Search workspace symbols -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list -nnoremap p :CocListResume diff --git a/home/.config/nvim/conf.d/05-language.vim b/home/.config/nvim/conf.d/05-language.vim deleted file mode 100644 index e5e7cb5e..00000000 --- a/home/.config/nvim/conf.d/05-language.vim +++ /dev/null @@ -1,12 +0,0 @@ -" LaTex settings -let g:vimtex_view_method='zathura' -let g:Tex_DefaultTargetFormat='pdf' -let g:Tex_MultipleCompileFormats='pdf, aux' -let g:vimtex_compiler_progname='nvr' - -" YAML settings -au! BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=indent -autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab - -" Run rustfmt on save -let g:rustfmt_autosave = 1 diff --git a/home/.config/nvim/conf.d/06-misc.vim b/home/.config/nvim/conf.d/06-misc.vim deleted file mode 100644 index 1315f116..00000000 --- a/home/.config/nvim/conf.d/06-misc.vim +++ /dev/null @@ -1,41 +0,0 @@ -" Enable python support -let g:python3_host_prog='/usr/bin/python3' -let pyxversion=3 - -" LaTex fallback flavor -let g:tex_flavor = 'latex' - -" Use suda by default -let g:suda_smart_edit = 1 - -" Remap exit terminal mode to esc -au TermOpen * tnoremap - -" Use system clipboard -set clipboard=unnamedplus - -" Remove extra line -set cmdheight=1 - -" Disable auto commenting -set formatoptions-=cro - -" Set pandoc preview program -let g:pandoc_preview_pdf_cmd = "zathura" - -" Case insensitive search -set ignorecase -set smartcase - -" Nerdtree settings -let NERDTreeMinimalUI = 1 "remove press ? for help" -let NERDTreeAutoDeleteBuffer = 1 " delete buffer when file is deleted -let NERDTreeQuitOnOpen = 1 " close nerdtree when opening file -let NERDTreeDirArrows = 1 - -" Firenvim filetypes -au BufEnter github.com_*.txt set filetype=markdown -au BufEnter gitlab.com_*.txt set filetype=markdown -au BufEnter git.reekynet.com_*.txt set filetype=markdown -au BufEnter www.reddit.com_*.txt set filetype=markdown -au BufEnter node.reekynet.com_*.txt set filetype=json diff --git a/home/.config/nvim/conf.d/07-fzf.vim b/home/.config/nvim/conf.d/07-fzf.vim deleted file mode 100644 index 60be3f2e..00000000 --- a/home/.config/nvim/conf.d/07-fzf.vim +++ /dev/null @@ -1,43 +0,0 @@ -" FZF in floating window - -autocmd! FileType fzf -autocmd FileType fzf call SetFZFoptions() -function SetFZFoptions() - set noshowmode noruler nonumber norelativenumber - tunmap -endfunction - -let g:fzf_layout = { 'window': 'call FloatingFZF()' } -function! FloatingFZF() - let buf = nvim_create_buf(v:false, v:true) - call setbufvar(buf, '&signcolumn', 'no') - - let width = float2nr(&columns * 0.8) - let height = float2nr(&lines * 0.6) - let horizontal = 1 - let vertical = 1 - - let opts = { - \ 'relative': 'editor', - \ 'row': (&lines - height) / 2, - \ 'col': (&columns - width) / 2, - \ 'width': width, - \ 'height': height, - \ 'style': 'minimal' - \ } - - call nvim_open_win(buf, v:true, opts) -endfunction - -" Looks -"let $FZF_DEFAULT_OPTS=' --color=dark --color=fg:15,bg:-1,hl:1,fg+:#ffffff,bg+:0,hl+:1 --color=info:0,prompt:0,pointer:12,marker:4,spinner:11,header:-1 --layout=reverse --margin=1,4' - -" ripgrep custom settings -command! -bang -nargs=* Rg - \ call fzf#vim#grep('rg --column --line-number --no-heading --color=always --smart-case ' - \ . (len() > 0 ? : '""'), 0, - \ fzf#vim#with_preview({'options': ['--delimiter=:', '--nth=2..', '--layout=reverse', '--info=inline']}), 0) - -" Keybinds -nmap :Files -nmap :Rg diff --git a/home/.config/nvim/init.lua b/home/.config/nvim/init.lua new file mode 100644 index 00000000..965aaeed --- /dev/null +++ b/home/.config/nvim/init.lua @@ -0,0 +1,9 @@ +require 'pluginmanager' +require 'keybinds' +require 'settings' +require 'autocmd' + +-- Plugin configurations +require 'plugins/airline' +require 'plugins/nerdtree' +require 'plugins/lsp' diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim deleted file mode 100644 index 6d4602ff..00000000 --- a/home/.config/nvim/init.vim +++ /dev/null @@ -1,3 +0,0 @@ -for f in split(glob('~/.config/nvim/conf.d/*.vim'), '\n') - exe 'source' f -endfor diff --git a/home/.config/nvim/lua/autocmd.lua b/home/.config/nvim/lua/autocmd.lua new file mode 100644 index 00000000..93e04708 --- /dev/null +++ b/home/.config/nvim/lua/autocmd.lua @@ -0,0 +1,4 @@ +local cmd = vim.cmd + +-- Remap exit terminal mode to esc +cmd('au TermOpen * tnoremap ') diff --git a/home/.config/nvim/lua/keybinds.lua b/home/.config/nvim/lua/keybinds.lua new file mode 100644 index 00000000..e9feb391 --- /dev/null +++ b/home/.config/nvim/lua/keybinds.lua @@ -0,0 +1,10 @@ +local map = function(type, key, value) + vim.fn.nvim_buf_set_keymap(0, type, key, value, {noremap = true, silent = true}) +end + +-- Open/close nerdtree +map('n', '', 'NERDTreeToggle') + +-- FZF +map('n', '', 'Files') +map('n', '', 'Rg') diff --git a/home/.config/nvim/lua/pluginmanager.lua b/home/.config/nvim/lua/pluginmanager.lua new file mode 100644 index 00000000..4aaab0e3 --- /dev/null +++ b/home/.config/nvim/lua/pluginmanager.lua @@ -0,0 +1,46 @@ +local fn = vim.fn +local cmd = vim.cmd + +-- Install packer if it's not yet installed +local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim' +local packer_not_installed = fn.empty(fn.glob(install_path)) + +if packer_not_installed > 0 then + print('Packer is not installed, cloning it now...') + cmd ('silent !git clone https://github.com/wbthomason/packer.nvim ' .. install_path) +end + +-- Configure packer +cmd 'packadd packer.nvim' +require('packer').startup(function() + + -- The plugin manager itself + use {'wbthomason/packer.nvim', opt = true} + + -- Colorscheme + use 'joshdick/onedark.vim' + + -- Custom status and tabline + use 'vim-airline/vim-airline' + + -- Tree explorer + use 'scrooloose/nerdtree' + + -- Fuzzy finder + use 'junegunn/fzf' + use 'junegunn/fzf.vim' + + -- Do stuff as sudo + use 'lambdalisue/suda.vim' + + -- Configs for built-in LSP + use 'neovim/nvim-lspconfig' + + -- Completion framework + use 'nvim-lua/completion-nvim' +end) + +-- Install plugins if packer was not installed +if packer_not_installed > 0 then + cmd 'PackerInstall' +end diff --git a/home/.config/nvim/lua/plugins/airline.lua b/home/.config/nvim/lua/plugins/airline.lua new file mode 100644 index 00000000..9a30505f --- /dev/null +++ b/home/.config/nvim/lua/plugins/airline.lua @@ -0,0 +1,10 @@ +local g = vim.g +local o = vim.o + +o.showmode = false +o.laststatus = 2 +g["airline#extensions#tabline#enabled"]= 1 +g.airline_powerline_fonts = 1 +g.airline_section_warning = '' +g.airline_section_error = '' +g.airline_theme = 'onedark' diff --git a/home/.config/nvim/lua/plugins/completion.lua b/home/.config/nvim/lua/plugins/completion.lua new file mode 100644 index 00000000..2f991d6c --- /dev/null +++ b/home/.config/nvim/lua/plugins/completion.lua @@ -0,0 +1 @@ +vim.cmd "autocmd BufEnter * lua require'completion'.on_attach()" diff --git a/home/.config/nvim/lua/plugins/lsp.lua b/home/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 00000000..7dfc32e1 --- /dev/null +++ b/home/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,3 @@ +local cmd = vim.cmd + +require 'lspconfig'.rust_analyzer.setup{} diff --git a/home/.config/nvim/lua/plugins/nerdtree.lua b/home/.config/nvim/lua/plugins/nerdtree.lua new file mode 100644 index 00000000..e69de29b diff --git a/home/.config/nvim/lua/settings.lua b/home/.config/nvim/lua/settings.lua new file mode 100644 index 00000000..0a0a118e --- /dev/null +++ b/home/.config/nvim/lua/settings.lua @@ -0,0 +1,44 @@ +local o = vim.o +local cmd = vim.cmd + +------ Appearance ------ + +-- Set colorscheme +cmd 'colorscheme onedark' + +-- True colors +o.termguicolors = true + +-- Floating window transparency +o.winblend = 10 + +-- Remove extra line +o.cmdheight = 1 + +-- Always show signcolumn +o.signcolumn = 'yes' + +-- Gutter and cursoline bg transparent +cmd 'highlight CursorLineNr guibg=transparent' +cmd 'highlight SignColumn guibg=transparent' + +------ Misc ------- + +-- Case insensitive search +o.ignorecase = true +o.smartcase = true + +-- Use system clipboard +o.clipboard = 'unnamedplus' + +-- Autoindent and syntax higlight +o.autoindent = true +o.smartindent = true +o.tabstop = 4 +o.shiftwidth = 4 +cmd 'syntax on' +cmd 'filetype on' +cmd 'filetype plugin indent on' + +-- Disable auto commenting +o.formatoptions = 'cro'