Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

"dockerized" Vim

NotificationsYou must be signed in to change notification settings

null395922/alpine-vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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.fileAlso 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 calledbundle with them.
  2. mount it:docker run ... -v <***>/my-stuff:/ext/ ... jare/vim-bundleBut the best way will be extending this container.
Plugins:
  1. AirlineLean & mean status/tabline for vim that's light as air
  2. TagbarPlugin that displays tags in a window, ordered by scope
  3. EasyGrepFast and Easy Find and Replace Across Multiple Files
  4. BufexplorerBufExplorer Plugin for Vim
  5. CtrlPFuzzy file, buffer, mru, tag, ... finder with regexp support
  6. The NERD TreeA tree explorer plugin for vim
  7. NERDTree tabsNERDTree and tabs together in Vim, painlessly
  8. SyntasticSyntax checking hacks for vim
  9. Vim-ScalaIntegration of Scala into Vim - not a ton here, but useful
  10. Solarized Colorscheme for VimSolarized Colorscheme
  11. TaglistSource code browser (supports C/C++, java, perl, python, tcl, sql, php, etc)
  12. Vim-expand-regionVisual selection of increasingly larger regions using the same key combination
  13. Fugitivefugitive.vim: a Git wrapper so awesome, it should be illegal
  14. GitgutterPlugin which shows a git diff in the gutter (sign column) and stages/reverts hunks
  15. Vim-goGo development plugin for Vim
  16. Vim-markdownVim Markdown runtime files
  17. Vim-indent-objectDefines a new text object representing lines of code at the same indent level
  18. Vim-multiple-cursorTrue Sublime Text style multiple selections for Vim
  19. Vim-repeatEnable to repeat last change by non built-in commands
  20. Vim-surroundsurround.vim: quoting/parenthesizing made simple
  21. The Most Recently Used (MRU)Plugin to manage Most Recently Used (MRU) files
  22. YankRingMaintains a history of previous yanks, changes and deletes
  23. Vim-HAMLVim runtime files for Haml, Sass, and SCSS
  24. snipMate & UltiSnip Snippetsvim-snipmate default snippets (Previously snipmate-snippets)
  25. EasymotionVim motions on speed!
  26. UndotreeThe ultimate undo history visualizer for VIM
  27. Vim-javascriptVastly improved Javascript indentation and syntax support in Vim.
  28. NerdCommenterPlugin for intensely orgasmic commenting
  29. TabularScript for text filtering and alignment
  30. DelimitMatePlugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
  31. Vim-indent-guidesA Vim plugin for visually displaying indent levels in code
  32. Vim-lessvim syntax for LESS (dynamic CSS)
  33. HTML5.vimHTML5 omnicomplete and syntax
  34. Vim-jsonSyntax highlighting for JSON in Vim
  35. Vim-addon-mw-utilsvim: interpret a file by function and cache file automatically
  36. TlibSome utility functions for VIM
  37. Vim-tmux-navigatorto 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:
  • For the full Golang support you need to mount/usr/lib/go. For example, runjare/go-tools in the detached modedocker create -v /usr/lib/go --name vim-go-tools jare/go-tools /bin/true and mount its volumes like thisdocker run ... --volumes-from vim-go-tools ... jare/vim-bundle or add it to the aliasalias edit="docker run -ti --rm --volumes-from go-tools -v $(pwd):/home/developer/workspace jare/vim-bundle"
  • If you want to use ago-tool , butvim-go doesn't provide a shorthand - you can simply type, for example,:!gofmt % and it will output formatted source of the current buffers(%:p absolute file path,%:h head of the file name and%:p:h is the current directory). If you want to overwrite - use:% ! gofmt % Thegofmt tool used as an example, actually, it covered in vim-go.
Alternatively, you can put something like this into .bashrc to automatically bootstrap all containers:
#docker vim-bundlefunctioned() {local dtc_id=$(docker ps -a -q --filter'name=vim-go-tools')if [[-z"${dtc_id}" ]];thenecho'vim-go-tools container not found. Creating...'  docker create -v'/usr/lib/go' --name'vim-go-tools' \'jare/go-tools''/bin/true'echo'Done!'fiecho'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:
  • With something like GNOME terminal You should be able to:
    • drag and drop text into the Vim.
    • use mouse right button menu by holdingShift.
  • <Leader> mapped to,. I use the basic mappings from the greatamix .vimrc
  • You can set the user with the ENV variablesin the Dockerfile
  • If Vim or Powerline doesn't look right in the tmux trytmux -2
  • If the Golang auto-complete doesn't work trygo install package
  • Leave a comment if you found a bug or if you have a suggestion
  • Any contribution are greatly appreciated as well as new runtime containers!

About

"dockerized" Vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile51.2%
  • Vim Script46.0%
  • Shell2.8%

[8]ページ先頭

©2009-2025 Movatter.jp