Last active
July 23, 2023 21:49
-
-
Save sixtusagbo/8a7d17483cac527bc6f05cebf9a7282b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if !has('nvim') | |
" Vundle | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'dense-analysis/ale' | |
Plugin 'nvie/vim-flake8' | |
Plugin 'vim-scripts/indentpython.vim' | |
Plugin 'jiangmiao/auto-pairs' | |
Plugin 'Lokaltog/powerline' | |
Plugin 'kien/ctrlp.vim' | |
Plugin 'SirVer/ultisnips' " snippets engine | |
Plugin 'honza/vim-snippets' " snppets themselves :) | |
call vundle#end() | |
filetype plugin indent on | |
filetype indent on | |
filetype plugin on | |
packadd YouCompleteMe " For autocompletion | |
" modified plugin keybindings | |
let g:ctrlp_prompt_mappings = { | |
\ 'AcceptSelection("v")': ['<C-Right>', '<RightMouse>'] | |
\ } | |
let g:ycm_key_list_select_completion = ['<Down>'] | |
let g:UltiSnipsExpandTrigger="<tab>" | |
let g:UltiSnipsJumpForwardTrigger="<tab>" | |
let g:UltiSnipsJumpBackwardTrigger="<s-tab>" | |
let g:ale_linters = { | |
\ 'python': ['flake8'], | |
\} | |
" Powerline | |
set laststatus=2 " Always display the statusline in all windows | |
set showtabline=2 " Always display the tabline, even if there is only one tab | |
autocmd InsertEnter,InsertLeave * set cul! | |
hi CursorLine cterm=NONE ctermbg=240 | |
hi CursorLineNr cterm=NONE | |
" accelerate terminal | |
set ttimeout | |
set ttimeoutlen=1 | |
set ttyfast | |
set clipboard+=unnamedplus " Use system clipboard | |
endif | |
set number " show line numbers | |
set mouse=a " enable mouse | |
set ruler | |
set autoindent " indent when moving to the next line while writing code | |
set smartindent " set ruler | |
set cindent | |
set hlsearch " highlight current search match | |
set incsearch " incremental search | |
set encoding=utf-8 | |
set smarttab " set tabs for a shifttabs logic | |
set expandtab " expand tabs into spaces | |
set showmatch " shows matching part of bracket pairs (), [], {} | |
set backspace=indent,eol,start " backspace removes all (indents, EOLs, start) | |
set splitright "enable vertical split | |
set splitbelow | |
set nobackup " no backup files | |
set nowritebackup " only in case you don't want a backup file while editing | |
set noswapfile " no swap files | |
let python_highlight_all=1 | |
syntax enable | |
set t_Co=256 "Enable all 256 colors | |
au BufNewFile,BufRead *.py | |
\ set tabstop=4 | | |
\ set softtabstop=4 | | |
\ set shiftwidth=4 | | |
\ set expandtab | | |
\ set fileformat=unix | |
au BufNewFile,BufRead *.js,*.html,*.css | |
\ set tabstop=2 | | |
\ set softtabstop=2 | | |
\ set shiftwidth=2 | |
au BufNewFile,BufRead *.c | |
\ set noexpandtab | | |
\ set tabstop=8 | | |
\ set shiftwidth=8 | |
highlight BadWhitespace ctermbg=lightred guibg=lightred | |
au ColorScheme * highlight BadWhitespace ctermbg=lightred guibg=lightred | |
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h,*.js match BadWhitespace /\s\+$/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment