Coder Social home page Coder Social logo

vimbox's Introduction

πŸ“’ Announcement: πŸ“’

I have been working on a new version of vimbox that uses Atom/VSCode style json configuration and allows you to just drag a VimBox.app into your applications directory. Some good features:

  • Self contained .app (but still requires that you have MacVim installed).
  • .json based configuration.
  • When loading the app, it automatically pulls everything down from this repo.
  • It creates an isolated Vim environment that doesn't disturb your current ~/.vim/~/.vimrc. It is a different approach - better in my opinion. It really is "vim in a box" - a sandbox.
  • Also will work on terminal / Linux / Windows. Share your config across platforms. Json configuration can be platform specific settings.json vs. settings.linux.json, and settings.osx.gui.json etc. (no one click .app for linux/windows though, you need to create your own launcher).

Here is the branch that it lives at. Follow the instructions there to try it out.

Thank you for your patience while I have not been super responsive to issues on #master branch - it is because I have been working on the new #json branch linked above which should take the place of #master. Feedback appreciated.

VimBox

Modern MacVim Configuration
  • Mac Keyboard mappings
  • Familiar autocomplete behavior
  • JavaScript indentation and lint support
  • Snippets (with JavaScript examples)
  • Spacegray theme with matching app icon.

VimBox with Atom inspired one-dark theme.

VimBox's matching application icon

Installation:

Quickly try VimBox in place of your existing setup. Back up your existing vim files, and move them out of the way as instructed:

  1. If you already have a vim setup, move it safely out of the way or back it up.

     mv ~/.vim ~/.vim_backup    #No trailing slashes to preserve symlinks!
     mv ~/.vimrc ~/.vimrc_backup
     mv ~/.gvimrc ~/.gvimrc_backup
    
  2. You Must Install a Recent Version of MacVim: (with python support)

     # Alternatively, if you'd rather install via `brew`
     brew install macvim --with-cscope --python --HEAD
     brew linkapps    # Put the app in your /Applications directory
    
  3. Clone VimBox wherever you like to keep your github clones

     # cd ~/github/     # Or wherever you like to keep github clones
     git clone https://github.com/jordwalke/VimBox/
     ln -s `pwd`/VimBox/dotVim ~/.vim      # Link to the cloned vim config
     ln -s `pwd`/VimBox/dotVimRc ~/.vimrc
     ln -s `pwd`/VimBox/dotGVimRc ~/.gvimrc
    
  4. Start MacVim that you just installed. It will prompt you to download the plugins in the background. If you opt to do so, it may take a while to startup but be patient.

  5. [Recommended] Install the included vim-airline font so VimBox looks like the screenshot with the vim-airline bar. From the command line:

     open ./VimBox/dotVim/Fonts/InconsolataDz/Inconsolata-dz\ for\ Powerline.otf # Then click "Install Font"
    
  6. Install up-to-date node.js if you want JS linting (http://nodejs.org/)

  7. Make your MacVim use the VimBox icon (optional):

open /Applications/
# Find the MacVim app icon and press `⌘+i` to open the information window
open ./dotVim/images
# drag the ApplicationIcon.icns onto the little icon in the information window
# and restart MacVim.

Features:

Familiar Mac Key Commands

Key Action
⌘+p Open Anything (ctrl-p)
⌘+n New Tab
⌘+shift+n New Window
⌘+shift+t Reopen Last Closed Tab
⌘+w Close tab/split: Opens to the left (like Sublime) not right (like vim)
⌘+s Save file
⌘+z Undo
⌘+shift+z Redo
⌘+enter Special Distraction-Free FullScreen Mode
⌘+\ Toggle File Explorer (Docked NERDTree)
⌘+shift+\ Find current file in file explorer
^+\ Toggle focus between file explorer
⌘+shift+[ / ⌘+shift+] Go to previous/next tab
^+tab / ^+shift+tab Go to previous/next tab (in normal Vim mode)
⌘+1 Go to tab 1
F5 Sort lines (like Textmate)
⌘+/ Toggle comments - selected range - or line
⌘+shift+c format/indent entire file then restore cursor
⌘+d Toggle Diagnostics (errors in location list)
⌘+D Toggle QuickFix list
⌘+r "Run" - invokes pwd/runFromEditor.sh

The file browser shortcuts are carefully setup so that when you use the shortcuts for opening/closing/toggling-focus, the window positions will not be resized. Make sure to use ^+\ if you want to jump back and forth between the file tree and your editor - it will remember the editor you were last in, and not disturb window positions (just like Atom or other modern editors).

Mega Escape

  • VimBox has mapped ^+l to exit out of any modal window/prompt/mode/command to bring you back to normal Vim navigation mode.
  • It's like the home button on the iPhone.
  • Unlike regular <Esc>, mega-escape doesn't move your cursor when escaping.
  • Remap CapsLock to control and never reach for Escape again. Hit the CapsLock key and l right on the home row.
Key Action
^+l Mega Escape

Airline/Spacegray

VimBox includes vim-airline and Spacegray color scheme.

Braces and Pairs

  • Inserting {, [, ', or " automatically inserts the closing character.
  • When hitting enter with the cursor between two braces {|} the newline is formatted with an extra indentation.
  • The behavior is identical to Sublime/Textmate.

AutoComplete/Snippets

  • Completions pop up automatically.
  • Like Sublime, VimBox accepts highlighted entries via tab or enter.
  • tab also triggers a snippet when applicable, and tab will allow "tabbing" through the snippet placeholders.
  • Place custom snippets in ~/.vim/myUltiSnippets/
  • If the completion window is open and you want to insert a newline instead of inserting the completion, press shift+enter or control+enter.

Distraction Free UI Tabs

  • When not in full screen mode, Mac style metalic tabs are used.
  • When in full-screen mode, those tabs become flat and blend into the background so you can focus on the code.

One File, One Location

Included plugins are configured so that opening a file will always focus the window/tab/split where that file is already open. This is how most modern editors work.

Many Plugins, One Interaction Language

Multiple plugins (ctrl-p and NERDTree) have been configured so that they have consistent keyboard mappings. For example, s represents the notion of a "vertical split", and h represents horizontal in both plugins (though one plugin might require a ctrl modifier in some cases.)

Command-P Search Window

The ctrl-p plugin has been configured to "do the right thing", which means searching for some combination of recently used files and/or the contents under the current working directory. It caches the results, but if you open it from your home directory, it could take a while to scan your entire directory.

Key Action
⌘+p Open Anything and begin searching for file
enter While searching, opens the top hit in new tab or jump to existing window if already open
c-s While searching, opens the top hit in a vertical split or jump to existing window if already open
c-h While searching, opens the top hit in horizontal split or jump to existing window if already open
⌘+shift+c While searching, refreshes the search results if files have changed on disk
ctrl+c Kills a slow search

NERDTree

NERDTree is included and is configured to act as a left-nav bar (toggle it via ⌘+e). Its keymappings have been configured to be consistent with the ctrl-p plugin.

Key Action
⌘+e Toggle side bar file explorer
⌘+E Reveal current file in side bar file explorer
j/k While explorer focused, move up and down
enter While explorer focused, opens a file in new tab or jump to existing window if already open
s While explorer focused, opens a file in a vertical split or jump to existing window if already open
h While explorer focused, opens a file in horizontal split or jump to existing window if already open
u While explorer focused, Move up a directory
o While explorer focused, Expand a subdirectory
CD While explorer focused, Make the file explorer's directory equal to Vim's cwd
cd While explorer focused, make Vim's cwd equal to the directory under the cursor
m While explorer focused, show complete menu of possible commands to execute

Tabs And Splits Navigation

Jump around quickly to the next tab or split with a single key press. Go back the other direction by pressing shift.

Key Action
⌘+shift+h, ⌘+shift+l While in Vim's normal mode - focus split to the left or right
⌘+shift+j, ⌘+shift+k While in Vim's normal mode - focus split to the top or bottom (not in diff mode)
⌘+shift+j, ⌘+shift+k While in Vim's normal mode - and diff mode, go to next / previous changes
⌘+shift+p While in Vim's normal mode - focus previously focused tab
Space/shift+Space While in Vim's normal mode - go to next/preious tab
tab/shift+tab While in Vim's normal mode - go to next/previous split

####JavaScript Development

JavaScript Linting

  • Excellent JavaScript indenting and inline linting with support for JSX.
  • Syntax error highlighting via Syntastic.
  • Type error highlighting via flow. Just have flow installed on your path, and type/syntax errors will be underlined in red. As always, hit ⌘+l to toggle the summary of the file's errors.

JavaScript Snippets

  • JavaScript snippets are include, but you can add your own for any language you like
Key Action
for tab for loop
if if statement
forin tab for-in loop
fun tab function definition
lam tab Lambda function
try tab try/catch
log tab console.log
logo tab Log stringified object to console
tag tab JSX tag <typeHere att={}></typeHere>
logo tab Many more including ReactJS helpers

JavaScript DocBlock Generator

The following key mapping generates docblock comments. <tab> will select the parameters in the generated docblock so you can edit the descriptions/types. Works with ES6 functions.

Key Action
⌘+shift+i Generate JS Docblock - when cursor is above a function

Git Integration:

Setup DiffTool:

Any result of a git diff command can be viewed in a side-by-side diff view inside of MacVim. All of your familiar vim key commands work while browsing your diff. Place this in your ~/.gitconfig:

    [diff]
        tool = default-difftool
    [difftool "default-difftool"]
        cmd = "~/.vim/mvimgitdiff.sh " $LOCAL $REMOTE

Now you can use the git difftool command exactly like you use git diff, but a MacVim window will appear:

Setup MergeTool:

Resolving merge conflicts is simple with MacVim. Just put this in your ~/.gitconfig.

    [mergetool]
      prompt = false
      # See bashrc for exporting the editor across all apps, not just git.
    [mergetool "mvimdiff"]
      cmd="/Applications/MacVim.app/Contents/MacOS/Vim -g -f '+windo set diff scrollbind scrollopt+=hor nowrap' -c 'Gdiff' $MERGED -c 'au VimLeave * !open -a iTerm'"
      # cmd="mvim -c 'Gdiff' $MERGED"     # use fugitive.vim for 3-way merge
      keepbackup=false

    [merge]
      tool = mvimdiff

Now, git mergetool will resolve rebase and merge conflicts directly inside of MacVim.

Setup Commit Message Editor:

Make sure to tell your shell that MacVim is the way that you'd like to edit commit messages. This special command will ensure that when you close your MacVim window, you will return back to the command line iTerm. Replace with your shell rc file and terminal app name.

echo export EDITOR='mvim -f --nomru -c "au VimLeave * !open -a iTerm"' >> ~/.bashrc
echo export GIT_EDITOR='mvim -f --nomru -c "au VimLeave * !open -a iTerm"' >> ~/.bashrc

Plugin System:

VimBox achieves its features through configuration of several plugins, but those should be considered implementation details of the VimBox distribution. VimBox uses modern editors as a "spec" for features and will configure several plugins in order to conform to that spec.

  • You can add any plugin you like using the Plug command.
  • Add custom plugins using the Plug command inside ~/.vim/bundlesVimRc.custom.
  • Customize ~/.vim/vimrc.custom.before to configure Vim before any of the bundles are loaded, and customize ~/.vim/vimrc.custom.after to configure Vim after plugins are loaded.

Customizing:

In ~/.vim/vimrc.custom.before/~/.vim/vimrc.custom.after you may set any options you like. (See "Plugin System" section above).

VimBox will look to see if you have defined the following variables defined in your ~/.vim/vimrc.custom.before:

Key Behavior
let g:textColumns = 82 Set text wrapping width
let g:tabSize = 2 Set tab width

Using VimBox's configuration from NeoVim

mkdir ~/.config
ln -s ~/.vim ~/.config/nvim
ln -s ~/.vimrc ~/.config/nvim/init.vim

License:

See the license file included. Any dependencies that are included in VimBox may have their own license. In the event any dependency is include in VimBox, an attempt has been made to also include its corresponding license in the directory containing that licensed work.

Origins:

See ./ORIGINS.md.

vimbox's People

Contributors

bsansouci avatar ddmendes avatar dreki avatar james2doyle avatar janniks avatar jordwalke avatar kyleamathews avatar pcottle avatar sourcesoft avatar vramana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vimbox's Issues

how to search through repository?

I assume this is already solved by tools such as :grep, but I wasn't able to find great documentation on this. How do you recommend searching through an entire repo for a search phrase. Currently using cmd + sft + f in Atom, so would love to replace that functionality... Thanks!

change default font family and size

Thank you for VimBox. I'm trying to change the default font family and size. I thought maybe this setting would be in dotVimRc but it wasn't (at least I couldn't find there).

Thanks for the help.

Create plugin that opens file or focuses currently opened buffer if already exists.

openFileOrFocus('tab' | 'vsplit' | 'hsplit' | 'here')

Currently, both ctrl-p and NERDTree have a feature which I've ensured are configured consistently with each other in VimBox, however there's no way to use this exact same paradigm when scanning search results from :Rgrep etc. We should extract out this feature from ctrl-p or somewhere else. I recall asking that unite.vim include this feature and that may have included creating a function that we can copy/paste into VimBox.

Ship with ligature font

Let's ship with Fira or something, and have it automatically installed so ligatures work out of the box.

Suggest some free ligature fonts that we can include.

local jshintrc

seems like regardless whether there is a local .jshintrc in my project, jshint options are being read from ~/.vim/jshint.js..

Autocomplete error

Hi Jordan,
I'm a newbie in Vim/MacVim. I installed the VimBox and started to use it as-is. I was editing a python file in insert mode when I received the error message:
Error: Required Vim compiled with +python
E117 Unknown function: pythoncomplete#Complete
Press Enter or type ...

I'm using a MacOs HighSierra with python 3.6.3 installed via Homebrew and python 2.7.12 in the System. The MacVim installed was compiled with -python & +python3
Note that I only use python3 in my projects. I don't know how to fix this issue, so I commented the lines in the file ~/VimBox/dotVim/bundlesVimRc:
Plug lifepillar/vim-mucomplete'
source ~/.vim/pluginRc/mucompleteVimRc

Any help is very welcome. I really liked VimBox!
Tks in advance,
Marcio

Cmd+shift+e not opening nerdtree

Do you have any idea why a clean install of macvim and clean setup following your instructions would not result in cmd+shift+e opening the current file in nerdtree? It just does the default E command instead. Thanks in advance.

Reason support

So I just did a fresh install of vimbox and there seem to be a few issues:
image

After following the instructions I noticed the following things missing from vimbox:

  • I don't seem to be getting any syntax highlighting on Reason files.
  • No type hinting
  • Line numbers don't appear
  • I have the powerline fonts installed and the recommended fonts installed in fontbook but vimbox doesn't seem to pick it up.

EDIT: I ran the install script and now fonts appear to work.

Visual mode move up and down not working?

Hello there, I love Vimbox and everything about it but Im having some issues with getting https://github.com/matze/vim-move and/or https://github.com/tpope/vim-unimpaired working to move single or multiple lines up or down like the following.
vim-vertical-move demo

I have tried many different options to get it to work
In my bundlesVimRc.custom I have

" Add custom bundles here using the `NeoBundle` command.
"
Plug 'ervandew/supertab'
Plug 'airblade/vim-gitgutter'
Plug 'w0rp/ale'
Plug 'tpope/vim-unimpaired'
Plug 'justinj/vim-react-snippets'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'SirVer/ultisnips'
Plug 'matze/vim-move'

In my vimrc.custom.after I have

" Overwrite this file with whatever you want. This will be executed after
" loading any of the stock bundles/settings.

set number
set gfn=Inconsolata-dz\ for\ Powerline:h14
autocmd BufWritePost * GitGutter

let g:ale_fixers = {
 \ 'javascript': ['eslint']
 \ }

let g:ale_sign_error = '❗'
let g:ale_sign_warning = '⚠️'
let g:ale_fix_on_save = 1


" Visual mode mappings.

" Move between windows.
xnoremap <C-h> <C-w>h
xnoremap <C-j> <C-w>j
xnoremap <C-k> <C-w>k
xnoremap <C-l> <C-w>l

" Move VISUAL LINE selection within buffer.
xnoremap <silent> K :call wincent#mappings#visual#move_up()<CR>
xnoremap <silent> J :call wincent#mappings#visual#move_down()<CR>

" Bubble single lines
nmap <C-up> [e
nmap <C-down> ]e

" Bubble multiple lines
vmap <C-up> [egv
vmap <C-down> ]egv

I have even tried following multiple suggestions online and none are working as I would expect. Every time I visually select something and I use J or K to move up and down instead if moving up and down it tries to select more and does not move. Can someone direct me to how we can get this functionality in VimBox. Or if there is another move solution like this issue suggests, can someone direct me the key mapping to use it

The following links are tutorials I have tried to get this functionality to work in VImBox
https://www.youtube.com/watch?v=X5IAdaN6IwM&t=206s
https://www.youtube.com/watch?v=L93-S4qksVA
https://vim.fandom.com/wiki/Moving_lines_up_or_down

Errors while opening Reason files after a bs build

Hi!

Thanks for your great Vim config, everything works fine but I've been having issues with Reason recently.

Step to reproduce:

git clone git clone https://github.com/chenglou/reason-react-example.git
cd reason-react-example
npm install
npm run build
mvim .

Now open mvim src/simple/page.re from NERDTree.

In my case I get this error:
screen shot 2017-07-29 at 15 25 58

There are a lot more errors as I type and every time I save a Reason file.

I have installed reason-cli and everything seems to be installed correctly, for example I have no problems with the VS Code plugin, only with VimBox.

Note: If I delete the .merlin file, the file is opened without any errors.

Here is the content of my .merlin file if it helps:

####{BSB GENERATED: NO EDIT
FLG -ppx '/Users/adrien/Projects/reason-react-example/node_modules/bs-platform/bin/reactjs_jsx_ppx_2.exe'
FLG -ppx /Users/adrien/Projects/reason-react-example/node_modules/bs-platform/bin/bsppx.exe
S /Users/adrien/Projects/reason-react-example/node_modules/bs-platform/lib/ocaml
B /Users/adrien/Projects/reason-react-example/node_modules/bs-platform/lib/ocaml
FLG -nostdlib -no-alias-deps -color always -w -40+6+7+27+32..39+44+45
S /Users/adrien/Projects/reason-react-example/node_modules/reason-react/lib/ocaml
B /Users/adrien/Projects/reason-react-example/node_modules/reason-react/lib/ocaml
S /Users/adrien/Projects/reason-react-example/node_modules/bs-director/lib/ocaml
B /Users/adrien/Projects/reason-react-example/node_modules/bs-director/lib/ocaml
S src
B lib/bs/src
S src/retainedProps
B lib/bs/src/retainedProps
S src/todomvc
B lib/bs/src/todomvc
S src/simple
B lib/bs/src/simple
S src/logo
B lib/bs/src/logo
S src/interop
B lib/bs/src/interop
S src/async
B lib/bs/src/async
####BSB GENERATED: NO EDIT}

Thanks!

Merlin error when opening .ml file

Steps to reproduce:

git clone https://github.com/esy-ocaml/hello-reason.git
cd hello-reason
touch lib/A.ml
esy mvim lib/A.ml

Output:

"lib/A.ml" 0L, 0C
(merlin) backtrace:
Error detected while processing function merlin#Register[117]..merlin#LoadProject:
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/x/code/VimBox/dotVim/bundle/vim-reason/autoload/merlin.py", line 740, in setup_merlin
    failures = command("project","get")
  File "/Users/x/code/VimBox/dotVim/bundle/vim-reason/autoload/merlin.py", line 201, in command
    return merlin_process().command(context(cmd))
  File "/Users/x/code/VimBox/dotVim/bundle/vim-reason/autoload/merlin.py", line 170, in command
    raise MerlinException(value)
merlin.MerlinException: 'File "src/kernel/mocaml.ml", line 29, characters 2-8: Assertion failed'
Press ENTER or type command to continue

I'm not sure if the error is with VimBox specifically.

enter key throws error in insert mode

Hi there,

I'm using a fresh clone of VimBox as of today (from commit f56c141 ), and a fresh release of MacVim (snapshot 154), with no customizations. I literally just installed it and am trying it out.

In insert mode, the enter key doesn't work. When I hit enter to get a newline, both in GUI and in terminal mode it displays the following error:

E117: Unknown function: mucomplete#popup_exit
Press ENTER or type command to continue

pressing enter just repeats the error, though pressing escape clears it.

Where is vim-airline color scheme?

Docs state: "VimBox includes vim-airline and Spacegray color scheme."

But there is no such color scheme. If I use vim-airline, the default color scheme is used.

autocomplete not working at all...

I had to re-install vimbox after I upgraded to High Sierra and the fitting MacPorts due to some Python annoyances.

However, since all this autocomplete is not working anymore. Neither is the brace expansion etc.

Any hint how to drill down the problem? Which plug-in is it?

Airline spew after clean install

OSX 10.10 I followed the following steps:

brew install macvim --with-cscope --python --HEAD
brew linkapps
cd VimBox
ln -s `pwd`/dotVim/ ~/.vim
ln -s `pwd`/dotVimRc ~/.vimrc
ln -s `pwd`/dotGVimRc ~/.gvimrc
mvim  # launch MacVim... install stuff, restart

I get the following error spew

Error detected while processing function airline#load_theme..airline#update_statusline..<SNR>44_invoke_funcrefs..airline#util#exec_funcrefs..airline#extensions#default#apply..<SNR>53_build_sections..<SNR>53_add_section..<SNR>53_get_section:
line    7:
E121: Undefined variable: g:airline_section_a
E116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
E15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
line    9:
E121: Undefined variable: text
E116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix
E15: Invalid expression: empty(text) ? '' : prefix.text.suffix
line    7:
E121: Undefined variable: g:airline_section_b
E116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
E15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
line    9:
E121: Undefined variable: text
E116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix
E15: Invalid expression: empty(text) ? '' : prefix.text.suffix
line    7:
E121: Undefined variable: g:airline_section_c
E116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
E15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
line    9:
E121: Undefined variable: text
E116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix
E15: Invalid expression: empty(text) ? '' : prefix.text.suffix
Error detected while processing function airline#load_theme..airline#update_statusline..<SNR>44_invoke_funcrefs..airline#util#exec_funcrefs..airline#extensions#default#apply..<SNR>53_get_section:
line    7:
E121: Undefined variable: g:airline_section_gutter
E116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
E15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
line    9:
E121: Undefined variable: text
E116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix
E15: Invalid expression: empty(text) ? '' : prefix.text.suffix
Error detected while processing function airline#load_theme..airline#update_statusline..<SNR>44_invoke_funcrefs..airline#util#exec_funcrefs..airline#extensions#default#apply..<SNR>53_build_sections..<SNR>53_add_section..<SNR>53_get_section:
line    7:
E121: Undefined variable: g:airline_section_x
E116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
E15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
line    9:
E121: Undefined variable: text
E116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix
E15: Invalid expression: empty(text) ? '' : prefix.text.suffix
line    7:
E121: Undefined variable: g:airline_section_y
E116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
E15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
line    9:
E121: Undefined variable: text
E116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix
E15: Invalid expression: empty(text) ? '' : prefix.text.suffix
line    7:
E121: Undefined variable: g:airline_section_z
E116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
E15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
line    9:
E121: Undefined variable: text
E116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix
E15: Invalid expression: empty(text) ? '' : prefix.text.suffix
line    7:
E121: Undefined variable: g:airline_section_warning
E116: Invalid arguments for function airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
E15: Invalid expression: airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
line    9:
E121: Undefined variable: text
E116: Invalid arguments for function empty(text) ? '' : prefix.text.suffix
E15: Invalid expression: empty(text) ? '' : prefix.text.suffix

I'm not sure what to do about this ..

MacVim crashes with VimBox enabled

I have python 3.5 enabled but get this if I try to open a file or run:

:python3 import sys; print(sys.version)

mac-pro:VimBox robby$ mvim
mac-pro:VimBox robby$ Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x00007fff7474a000 (most recent call first):
Vim: Caught deadly signal ABRT
Vim: Finished.

Make JavaScript in VimBox Awesome For Once.

VimBox should come with the most common integrations out of the box, such that all the plugins(syntastic) work well together. I'd really appreciate if someone would share/test what you know to work well, and include it in VimBox so others can benefit.

Create "Overlay" plugin.

Most vim windows have popups that cause all of your splits to jump around and it's super distracting. VimBox should come with a plugin that ensures that all toggling of quickfix, ctrlp, etc - never disrupt your split/window/scroll layout. Nothing should ever jump around when there is an overlay. Compare the Vim experience of ctrlp to that of something like Sublime's cmd+p overlay. In Sublime, the cmd+p overlay would never cause any of your text in buffers to jump around. Why should Vim editing be any different?

Homebrew Install: This formula has no --python/--with-cscope option

For the records, the homebrew installation probably won't require the flags:

Warning: macvim: this formula has no --python option so it will be ignored!
Warning: macvim: this formula has no --with-cscope option so it will be ignored!

I guess this isn't much of a problem. cscope was installed nonetheless as a dependency...

Autocomplete not working for some file types

I'm programming in Rebol, have a syntax highlighter for it and VIM shows it as file-type. But autocompletion is not working. For a C file, it's working. I once had it working for .r files as well but it somehow stopped.

Any idea how to track it down or for what to look for?

NerdTree Won't Open Directory

When I added this and fired it up for the first time, I toggled NerdTree and was able to move up and down, but not able to open any directory. Anyone have this issue they have resolved before?

Solve Window Management Once And For All

I'm not happy with the window management in VimBox, and most of this is Vim's fault but there doesn't seem to be any plugins that enable a modern window management experience.

For example, ctrl-p is a great plugin but it makes all the text jump up and down when the window opens - not modern.

The left nav in VimBox is cool but it's super slow to toggle (it uses vim-nerdtree-tabs plugin).

In general VimBox does a good job of having all plugins configured out of the box such that c-s vertically splits, c-h horizontally splits, <cr> opens in a new tab, and for all plugins it will jump to an existing window if the file already exists. I like that part about VimBox - very modern. But the actual physical positioning of "modals" and left-navs/file trees needs some improvement.

NerdTREE shortcuts not working / inconsistent

I'm struggling with some shortcuts not working:

Works: ⌘+\ Toggle File Explorer (Docked NERDTree)
Doesn't work: ⌘+e Toggle sidebar file explorer

Or are these two different things? The \ char is not very fortunate on a German keyboard. Is there a place where I can change it? Or are there are keyboard layout specific shortcuts?

Fonts/icons not working out of the box

So I just tried out the new VimBox on the json branch, and for the most part it worked great! It was extremely simple to set up and didn't mess with my existing Vim configurations. I do have one question, though, which is how can I get the font to be the same as the one in shown in the README. Currently, the font is as shown in the screenshot below. I also had some issues rendering icons (you can see the box with the ? inside it in the bottom status bar). Thanks in advance for your help!

Screen Shot 2020-02-19 at 9 14 30 AM

Question mark characters

Hey all,

Thanks for VimBox! I'm just now trying to get back into using vim to see what's changed.

I followed the README, but I just noticed that there are several weird characters in the status line:

ld-launched-bulk-targeting md__dropboxdrafts_-_vim_2016-10-27_09-59-46

Any idea what those are?

Thanks,

Alexis

Error detected while processing function UltiSnips#TrackChange

Recently I installed VimBox on my Mac but got unexpected error when I try to edit one python file with vim. It seems very wired. My python environment is py2.7 in anaconda. If I remove the ~/.vim ~/.vimrc and ``~/.gvimrc`, then the vim command can work smoothly.

Feedback Requested: Better Tabs System.

One issue with tabs is that it's a pain to try to keep the "left nav" in sync across all the tabs. Toggling across all tabs is very slow.
I've been experimenting with the "wintabs" plugin, which recreates the notion of tabs, but using buffers. It renders its own tabline, and therefore cannot use the GUI Mac tabs. I'm curious what users think of this. How often do you use Vim Tabs pages?

JavaScript linting not working anymore

I'm using eslint, and I'm used to seeing my linting errors inline. It says in the README this functionality should be there, but I'm not seeing any errors or warnings in VimBox 😒 any ideas how we could fix this?

Layer configuration stack into layers of varying opinion.

  1. baseline configuration (like css reset for vim).
  2. Mac integration (make keymappings consistent with other mac apps).
  3. Generally useful plugins that don't require many keyboard mapping opinions.
  4. Opinionated paradigms such as split/window/tab navigation and keyboard mappings such as "ctrl-l gets you out of everything".

Users should be able to opt out of a particular layer.

Windows master list:

List of issues / suggestions for Windows configuration. Action item is to automate these or document them.

Navigating menus:
(I actually wish there was a plugin like this for MacOS. Maybe we can embed AHK inside of an app distribution without stepping on other AHK installs https://hotkeyit.github.io/v2/docs/AutoHotkeyDll.htm ).

Fonts:

Packaging:

  • Use cygwrapper by default for box global binary but first intelligently detect if in cygwin environment.

Utilities:

  • Probably want to include xolox's utilities especially the shell utilities, but look at the other usages here which help unify windows/unix environments.

Make into self-contained app [master task]

If anyone is interested in working on this, please let me know. I will help you get the resources you need.

Definitely A Good Idea:

  • Package a pre-built version of MacVim with Ruby/Python etc, plus the VimBox icon into a single VimBox.app.
  • Packaged app should come with all plugins pre-downloaded, and the pre-downloaded versions would be copied into the user config directory at first startup time.
  • Put all config for VimBox into ~/.config/vimbox/ and never override existing Vim config (or neovim config) in ~/.vim. There should be no fear in trying VimBox, and it shouldn't mess with your existing config.
  • Version all of the NeoBundle plugins so that installs are reliable (right now, everything just downloads from master branch on each plugin's repo). We should specify the specific branch/commit, and mirror all the out-of-box plugins on a github org so that no plugin author can remove them causing installs to fail.
  • Move the upgrade workflow out of Vim and into another process. Since the .app comes with a version of all the plugins already downloaded, we don't need to interrupt the startup process to install the plugins (the only reason why it currently blocks the startup process to check for plugins is because the plugins aren't downloaded the first time you open the app). Stale plugins can be detected once the app starts up with the last version of the plugins, message the user that stuff's out of date, and kick off the upgrade process (possibly in a nice GUI workflow) - then app restart will make the updates take effect.
    -[ ] Include and install ligature font into Mac, so that out-of-the box, airline renders correctly and ligatures look great.

Not Necessarily a Good Idea But Investigate:

  • Bundle npm, and use npm to install all the Vim plugins. I'm not sure this is a good idea, but we could consider it. It would mean including a self-contained version of node! We would not be depending on npm the service at all because we'd list specific commit hashes of plugins, and we could mirror all of the plugins on a VimBox org just to make sure they'd always be available. See the benefits you'd get from using npm: You can automatically get a free GUI for updating plugins like Atom has: https://www.npmjs.com/package/npm-gui
    I'm always concerned about node/npm getting in the startup path of Vim (I like my instant window opening capabilities of MacVim thank you!) so it's important that all plugin management be done out of process.
  • Better/consistent/retina toolbar icons + keyboard shortcut to toggle the toolbar - these icons could be upstreamed to MacVim too, but I think we'd want specific icons for debugger integration and other VimBox specific features like (Reformat code etc).

The goal isn't to create a replacement of the MacVim download, but rather to have a one click app that people can try out so they can see what Vim (and MacVim) are capable of, but without disrupting their existing MacVim configuration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.