Skip to content

Instantly share code, notes, and snippets.

@fontenele
Last active August 29, 2015 14:15
Show Gist options
  • Save fontenele/8a78e970b220bd707159 to your computer and use it in GitHub Desktop.
Save fontenele/8a78e970b220bd707159 to your computer and use it in GitHub Desktop.
Um fork do gist de configuração (https://gist.github.com/phackwer) do Sublime Text 3 para funcionar similar ao Netbeans.
Segue relação dos plugins que estou utilizando com o Sublime, bem como minhas configurações:
O primeiro package a instalar é o Package Control. A partir dele é possível intalar todos os outros pacotes executando Ctrl+Shift+P (ou Cmd para quem usa Mac), e buscando por "Package Control:Install Package".
Para instalar o Package Control, execute as instruções contidas nesta página:
https://packagecontrol.io/installation
Agora, chame o comando de instalação de pacotes e instale os seguintes pacotes.
- BracketGuard
- BracketHighlighter
- Theme - Brogrammer
- Colorsublime
- DocBlockr
- Emmet
- HTML 5
- jQuery
- Local History
- phpfmt
- PHPIntel
- Pretty JSON
- SideBarEnhancements
- SyncedSideBar
- Terminal
- SublimeLinter
- Function Name Display
Para desenvolvimento com o Symfony, instale também:
- Pretty YAML
- Symfony2 Snippets
- Twig
Instale agora o tema Spacegray Midnight, disponível em: https://github.com/phackwer/spacegray
Após instalar estes pacotes, configure seu ambiente para melhor apresentação do texto no Mac (no Windows, coloque outra fonte que lhe agrade) abrindo o arquivo de preferências do usuário e colocando o seguinte conteúdo:
{
"auto_ident": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/base16-eighties.dark (SL).tmTheme",
"detect_indentation": false,
"draw_white_space": "selection",
"font_face": "Andale Mono",
"font_size": 10,
"highlight_line": true,
"indent_subsequent_lines": true,
"indent_to_bracket": true,
"line_numbers": true,
"line_padding_bottom": 1,
"line_padding_top": 1,
"preview_on_click": true,
"shift_tab_unindent": true,
"show_full_path": true,
"tab_size": 4,
"theme": "Brogrammer.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true,
"use_tab_stops": true,
"word_wrap": false,
"highlight_modified_tabs": true
}
Agora vamos colocar o keybinding para Netbeans (trocar ctrl por super para o Mac)
[
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["alt+shift+f"], "command": "reindent" , "args": {"single_line": false}},
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["alt+shift+o"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["shift+alt+left"], "command": "prev_view_in_stack" },
{ "keys": ["shift+alt+right"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+'"], "command": "toggle_side_bar" },
]
Sabe um dos melhores recursos que tem para abrir uma definição de classe, método ou algo assim, apertando o ctrl e clicando? Também dá para fazer no Sublime. A tecla padrão é a F12, mas como eu não gosto de mudar o comportamento das minhas teclas, e apertar fn+F12 é chato, eu resolvi correr atrás de como fazer isso com alt+click (porque ctrl+click é o botão direito e não quero perder isso). E encontrei. Mudei o mapeamento para ser a tecla alt+click, então, se for fazer em outro OS, lembre-se de mudar de volta para ctrl.
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment