diff --git a/README.md b/README.md index 4cb5df8..e5dde24 100644 --- a/README.md +++ b/README.md @@ -1,86 +1,118 @@ -# Vim Configuration -This repository contains a custom Vim configuration designed to enhance usability, provide flexible indentation settings for various file types, and improve the overall coding experience. -## Features +# ⚙️ Vim Configuration -- **Search and Encoding**: - - Highlights all matches in search results (`hlsearch`). - - Ignores case in search patterns (`ignorecase`). - - Disables incremental search, highlighting matches only after pressing Enter (`noincsearch`). - - Sets file encoding to UTF-8 (`encoding=utf8`). - - Always displays the status line at the bottom of the screen (`laststatus=2`). +**A custom setup for enhanced coding productivity** +*Configuração personalizada para produtividade em programação* -- **Mouse Support**: - - Enables mouse functionality in visual mode (`set mouse=v`), if supported. +--- -- **Cursor Highlighting**: - - Highlights the entire line where the cursor is positioned for better focus (`cursorline`). +## ✨ Features / Funcionalidades -- **Vi Compatibility**: - - Ensures Vim is not in compatibility mode with Vi, enabling modern features (`nocompatible`). +### 🔍 Search & Encoding +- `hlsearch`: Highlight all matches / Destacar resultados +- `ignorecase`: Case-insensitive search / Ignorar maiúsculas +- `noincsearch`: Disable incremental search / Busca não incremental +- `encoding=utf8`: UTF-8 compatibility / Codificação UTF-8 +- `laststatus=2`: Always show status line / Barra de status fixa -- **Color Scheme**: - - Sets the color scheme to `codedark` for a modern look. +### 🖱️ Mouse & Interface +- `mouse=v`: Mouse in visual mode / Mouse no modo visual +- `cursorline`: Highlight cursor line / Destacar linha do cursor +- `codedark`: Modern dark theme / Tema escuro moderno -- **Filetype-Specific Indentation**: - - **HTML**: 2 spaces for tabs and indentation. - - **Python**: 4 spaces for tabs and indentation. - - **YAML**: 2 spaces for tabs and indentation with custom indent keys. +### 📐 Smart Indentation +- **HTML**: 2 spaces / 2 espaços +- **Python**: 4 spaces (PEP8) / 4 espaços +- **YAML**: 2 spaces + custom rules / 2 espaços + regras personalizadas -- **Autocommands**: - - Exits Insert mode automatically if idle for a defined period (`CursorHoldI`). - - Applies filetype-specific indentation settings when opening files. +### ⚡ Automation +- Auto-exit Insert mode / Sai do modo Inserção automaticamente +- Filetype-specific settings / Configurações por tipo de arquivo -- **Status Line**: - - Displays detailed information, including file name, working directory, cursor position, and more. +--- -## Configuration Details +## 🚀 Installation / Instalação +```bash +git clone https://github.com/your-user/vim-config.git +cp vim-config/.vimrc ~/.vimrc +``` +*(Optional/Opcional)* Install theme: +```vim +Plug 'tomasiser/vim-code-dark' " Via plugin manager +``` -```vim -syntax on -filetype plugin indent on +--- -" Search and encoding settings -set noincsearch " Disables incremental search; highlights only on Enter -set ignorecase " Ignores case in search patterns for easier matching -set encoding=utf8 " Sets file encoding to UTF-8 for better compatibility -set laststatus=2 " Always displays the status line at the bottom of the screen -set hlsearch " Highlights all matches for search results to improve visibility -set showmatch " Briefly highlights matching parentheses, brackets, or braces -set cursorline " Highlights the entire line where the cursor is positioned for better focus -set nocompatible " Ensures Vim is not in Vi mode +## ⚙️ Configuration Details +```vim +" === Core Settings === +syntax on +filetype plugin indent on " Syntax + filetype detection -" Color Scheme -colorscheme codedark +" 🔍 Search/Encoding +set noincsearch ignorecase +set encoding=utf8 hlsearch +set showmatch cursorline -" Enables mouse support if available -if has("mouse") - set mouse=v " Enables mouse support in visual mode -endif +" 🎨 Interface +colorscheme codedark +set laststatus=2 nocompatible -" Filetype-specific indentation -function HtmlConfig() - set tabstop=2 softtabstop=2 expandtab shiftwidth=2 -endfunction +" 🖱️ Mouse +if has("mouse") + set mouse=v " Visual mode only +endif -function PythonConfig() - set tabstop=4 softtabstop=4 expandtab shiftwidth=4 -endfunction +" 📐 Indentation Rules +function! HtmlConfig() + set tabstop=2 softtabstop=2 expandtab shiftwidth=2 +endfunction -function YamlConfig() - set tabstop=2 softtabstop=2 expandtab shiftwidth=2 - set indentkeys-=0# indentkeys-=<:> -endfunction +autocmd FileType html call HtmlConfig() +autocmd FileType python call PythonConfig() +autocmd FileType yaml,yml call YamlConfig() -" Autocommands -autocmd CursorHoldI * stopinsert " Exit Insert mode if idle -autocmd FileType html call HtmlConfig() -autocmd FileType python call PythonConfig() -autocmd FileType yaml,yml call YamlConfig() +" 📊 Status Line +set statusline=\ File:\ %F%m%r%h\ %w\ Dir:\ %{getcwd()}\ -\ Line:\ %l\ Col:\ %c -" Status line configuration -set statusline=\ File:\ %F%m%r%h\ %w\ \ Working\ Directory:\ %r%{getcwd()}%h\ -\ Line:\ %l\ -\ Column:\ %c +" 🛡️ Prevent Overrides +let g:skip_defaults_vim = 1 +``` -" Prevent defaults.vim from overwriting these settings -let g:skip_defaults_vim = 1 \ No newline at end of file +--- + +## 🇧🇷 Versão em Português +
+Clique para expandir + +### ✨ Funcionalidades +- **🔍 Busca e Codificação** + - Destaque de resultados (`hlsearch`) + - Busca case-insensitive (`ignorecase`) + - Codificação UTF-8 garantida + +- **🖱 Interface** + - Suporte a mouse no modo visual + - Tema `codedark` para melhor visibilidade + +- **📐 Indentação Inteligente** + - Configurações específicas para HTML/Python/YAML + +### ⚙️ Detalhes Técnicos +```vim +" === Autocomandos === +autocmd CursorHoldI * stopinsert " Sai do modo inserção após inatividade + +function! YamlConfig() + set tabstop=2 softtabstop=2 + set indentkeys-=0# " Ignora # em YAML +endfunction +``` + +
+ +--- + +## 📜 License / Licença +MIT License - Free to use and modify.