Last active
September 5, 2023 14:05
-
-
Save BrunaNayara/92419aaade23bab97451000418adbd28 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
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() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'psf/black' | |
Plugin 'sotte/presenting.vim' | |
Bundle 'liuchengxu/space-vim-theme' | |
Bundle 'dikiaap/minimalist' | |
Bundle 'ruanyl/vim-gh-line' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
" 256 Colors | |
if $TERM == "xterm-256color" | |
set t_Co=256 | |
endif | |
"Syntax Color | |
syntax on | |
"Line Number | |
set number | |
"Always in paste mode | |
"set paste | |
"Indentation whith Spaces | |
set expandtab | |
set tabstop=4 | |
set shiftwidth=4 | |
set autoindent | |
"Indentation per language | |
autocmd FileType html setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType css setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType ruby setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType perl setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType python setlocal shiftwidth=4 tabstop=4 smartindent | |
autocmd FileType lua setlocal shiftwidth=4 tabstop=4 | |
autocmd FileType c setlocal shiftwidth=4 tabstop=4 smartindent | |
autocmd FileType cpp setlocal shiftwidth=4 tabstop=4 smartindent | |
autocmd FileType javascript setlocal shiftwidth=4 tabstop=4 | |
autocmd FileType yml setlocal shiftwidth=2 tabstop=2 | |
"Code Folding | |
"set foldmethod=indent | |
"set nofoldenable | |
"set foldlevel=99 | |
"Tab Options | |
set tabpagemax=15 | |
map! <C-Right> <Esc>:tabn<CR> | |
map! <C-Left> <Esc>:tabp<CR> | |
nmap <C-Right> <Esc>:tabn<CR> | |
nmap <C-Left> <Esc>:tabp<CR> | |
"Redo | |
nmap r <C-r> | |
"Mark the current line | |
set cursorline | |
"Show unwanted white spaces | |
set list | |
set listchars=tab:>-,trail:~,extends:>,precedes:< | |
"Search option | |
set ignorecase | |
set hlsearch | |
nnoremap <CR> :nohlsearch<CR><CR> | |
"Make backspace work | |
set backspace=indent,eol,start | |
"Turn off sounds | |
set belloff=all | |
"File Encoding | |
set encoding=utf-8 | |
set fileencoding=utf-8 | |
set pastetoggle=<F2> | |
"Highlight exceding character in the 80th colunm | |
"highlight OverLength ctermbg=red ctermfg=white guibg=#592929 | |
"match OverLength /\%81v.\+/ | |
set colorcolumn=80 | |
"Font Style and Size - GUI | |
if has("gui_running") | |
if has("gui_gtk2") | |
set guifont=Inconsolata\ 12 | |
elseif has("gui_win32") | |
set guifont=Consolas:h11:cANSI | |
endif | |
endif | |
"Copy and paste from and to clipboard | |
if has("unix") | |
let s:uname = system("uname -s") | |
" regex to check if it is a Mac OS | |
if s:uname =~ "darwin" | |
command Copyfile w !pbcopy | |
command Copyline .w !pbcopy | |
nmap <F6> :set paste<CR>:r !pbpaste<CR>:set nopaste<CR> | |
imap <F6> <Esc>:set paste<CR>:r !pbpaste<CR>:set nopaste<CR> | |
nmap <F7> :.w !pbcopy<CR><CR> | |
vmap <F7> :w !pbcopy<CR><CR> | |
else | |
command Copyfile w !xclip -selection clipboard | |
command Copyline .w !xclip -selection clipboard | |
nmap <F6> :set paste<CR>:r !xclip -selection clipboard -o <CR>:set nopaste<CR> | |
imap <F6> <Esc>:set paste<CR>:r !xclip -selection clipboard -o <CR>:set nopaste<CR> | |
nmap <F7> :.w !xclip -selection clipboard<CR><CR> | |
vmap <F7> :w !xclip -selection clipboard<CR><CR> | |
endif | |
endif | |
" Ignore the following extensions when you try to autocomplete file path | |
set wildignore=*.o,*.pyc,*~,*.swp,*.swo | |
" Incrementally searchs while typing | |
set incsearch | |
" Always shows the line and colunm on the bottom left of the screen | |
set ruler | |
" Always keeps N lines before and after the cursor line | |
set scrolloff=15 | |
" Ignores files with those extensions in the file explorer | |
let g:netrw_list_hide= '^[.]*.*\.s[a-w][a-z]$,^.*\.py[co]$,^.*DS_Store$,^.*\.o$,^.*\~$' | |
" Search down into subfolders | |
" Provides tab-completion for all file-related tasks | |
set path+=** | |
" Display all matching files when we tab complete | |
set wildmenu | |
" Tips and Tricks | |
" Access the serach buffer: ctrl + r and slash (/) | |
" Access the "yank" buffer: ctrl + r and quotes (") | |
" Access the word under the cursor: ctrl + r and ctrl + w | |
" | |
au FileType rst let b:presenting_slide_separator = '\v(^|\n)\~{4,}' | |
" Don't forget to add | |
let g:gh_gitlab_domain = "git.digitgaming.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment