JAremko / alpine-vim

"dockerized" Vim
264 stars 80 forks source link
alpine-linux bundle docker docker-image dockerfile editor vim vimrc

jare/vim-bundle:latest

For the more "IDE like experience" try jare/drop-in

Or Vim/Emacs hybrid jare/spacemacs

Based on "The Ultimate vimrc"

Make sure to use "Solarized Dark" compatible theme or color palette may look weird.
You can configure terminal color mode by setting TERM variable docker run ... -e TERM=<VALUE> jare/vim-bundle By default the <VALUE> is xterm-256color but for the "less colorful" terminals set it to xterm.

The best way to use:

Make an alias: alias edit='docker run -ti --rm -v $(pwd):/home/developer/workspace jare/vim-bundle' Have fun! edit some.file Also You can use this one for getting updates: alias edit_update="docker pull jare/vim-bundle:latest"

How to disable some plugins:

docker run ... -e DISABLE="'vim-airline', 'nerdtree'" ... jare/vim-bundle

How to add your plugins and .vimrc:
  1. Create a folder with your .vimrc file and, if you want to add plugins, subfolder called bundle with them.
  2. mount it: docker run ... -v <***>/my-stuff:/ext/ ... jare/vim-bundle But the best way will be extending this container.
Plugins:
  1. Airline Lean & mean status/tabline for vim that's light as air
  2. Tagbar Plugin that displays tags in a window, ordered by scope
  3. EasyGrep Fast and Easy Find and Replace Across Multiple Files
  4. Bufexplorer BufExplorer Plugin for Vim
  5. CtrlP Fuzzy file, buffer, mru, tag, ... finder with regexp support
  6. The NERD Tree A tree explorer plugin for vim
  7. NERDTree tabs NERDTree and tabs together in Vim, painlessly
  8. Syntastic Syntax checking hacks for vim
  9. Vim-Scala Integration of Scala into Vim - not a ton here, but useful
  10. Solarized Colorscheme for Vim Solarized Colorscheme
  11. Taglist Source code browser (supports C/C++, java, perl, python, tcl, sql, php, etc)
  12. Vim-expand-region Visual selection of increasingly larger regions using the same key combination
  13. Fugitive fugitive.vim: a Git wrapper so awesome, it should be illegal
  14. Gitgutter Plugin which shows a git diff in the gutter (sign column) and stages/reverts hunks
  15. Vim-go Go development plugin for Vim
  16. Vim-markdown Vim Markdown runtime files
  17. Vim-indent-object Defines a new text object representing lines of code at the same indent level
  18. Vim-multiple-cursor True Sublime Text style multiple selections for Vim
  19. Vim-repeat Enable to repeat last change by non built-in commands
  20. Vim-surround surround.vim: quoting/parenthesizing made simple
  21. The Most Recently Used (MRU) Plugin to manage Most Recently Used (MRU) files
  22. YankRing Maintains a history of previous yanks, changes and deletes
  23. Vim-HAML Vim runtime files for Haml, Sass, and SCSS
  24. snipMate & UltiSnip Snippets vim-snipmate default snippets (Previously snipmate-snippets)
  25. Easymotion Vim motions on speed!
  26. Undotree The ultimate undo history visualizer for VIM
  27. Vim-javascript Vastly improved Javascript indentation and syntax support in Vim.
  28. NerdCommenter Plugin for intensely orgasmic commenting
  29. Tabular Script for text filtering and alignment
  30. DelimitMate Plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
  31. Vim-indent-guides A Vim plugin for visually displaying indent levels in code
  32. Vim-less vim syntax for LESS (dynamic CSS)
  33. HTML5.vim HTML5 omnicomplete and syntax
  34. Vim-json Syntax highlighting for JSON in Vim
  35. Vim-addon-mw-utils vim: interpret a file by function and cache file automatically
  36. Tlib Some utility functions for VIM
  37. Vim-tmux-navigator to navigate seamlessly between vim and tmux splits using a consistent set of hotkeys
  38. UltiSnips The ultimate snippet solution for Vim!
  39. YouCompleteMe Fast, as-you-type, fuzzy-search code completion
  40. Vimproc.vim Interactive command execution in Vim
  41. Dockerfile.vim syntax file for Docker's Dockerfile and snippets for snipMate

.vimrc

Working with Golang:
Alternatively, you can put something like this into .bashrc to automatically bootstrap all containers:
#docker vim-bundle
function ed() {
  local dtc_id=$(docker ps -a -q --filter 'name=vim-go-tools')
  if [[ -z "${dtc_id}" ]]; then
   echo 'vim-go-tools container not found. Creating...'
   docker create -v '/usr/lib/go' --name 'vim-go-tools' \
     'jare/go-tools' '/bin/true'
   echo 'Done!'
  fi
  echo 'Starting Vim'
  docker run -ti --rm -p 8080:8080 --volumes-from 'vim-go-tools' \
    -v $('pwd'):/home/developer/workspace 'jare/vim-bundle' "${@}"
}
export -f ed
Keep in mind: