Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File manipulation problems #113

Closed
n-raymond opened this issue Nov 1, 2015 · 2 comments
Closed

File manipulation problems #113

n-raymond opened this issue Nov 1, 2015 · 2 comments

Comments

@n-raymond
Copy link

Hy !
I'm uncountering problems during the opening and the saving of a scala file.

When I try to open a scala file, the status bar tels me that the file was well opened but the buffer remains empty. I always need to refresh the buffer by using the ctrc + c command, which is quite painful.

I have also this kind of problem during the saving of the file :
When I use the commande :w, the status bar tels me :
E13 : file exists (add ! to override)
By using the commande :w!, I always have to refresh the buffer manualy.

I tried to uninstall and reinstall your great plugin with Vundle but the problem persists.

Here is my vim --version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 21 2015 12:32:09)
MacOS X (unix) version
Included patches: 1-488
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         -gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H   -F/usr/local/Frameworks -DMACOS_X_UNIX  -Os -w -pipe -march=native -mmacosx-version-min=10.10 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang   -L. -L/usr/local/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names -o vim        -lm  -lncurses -liconv -framework Cocoa   -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -framework Python   -lruby.2.0.0 -lobjc

I wonder if the problem could come from an incompatibility with other plugins.
In dubt, here is also my .vimrc configuration :

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                                   PLUGINS                                   "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

set nocompatible
filetype off

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()




"***************** VUNDLE *****************"

" Vundle itself
Plugin 'gmarik/Vundle.vim' 



"**************** UTILITY *****************"

" Better status bar
Plugin 'bling/vim-airline'

" Easy commenting
Plugin 'scrooloose/nerdcommenter'

" Git gestion
"Plugin 'tpope/vim-fugitive'

" Add and change surrounding brackets
Plugin 'tpope/vim-surround'

" Brackets automatisation
Plugin 'Raimondi/delimitMate'

" XMate-like folder navigation
Plugin 'scrooloose/nerdtree'

"Doxygen
Plugin 'DoxygenToolkit.vim'

"Markdown
"Plugin 'suan/vim-instant-markdown'




"************ SNIPPETS GESTION ************"

" Snippets Engine
Plugin 'vim-scripts/UltiSnips'

" Snippets Library
Plugin 'honza/vim-snippets'



"********* LANGUAGE COMPATIBILITY *********"

" Prolog
"Plugin 'adimit/prolog.vim'

"Scala
Plugin 'derekwyatt/vim-scala'

" Coq
"Plugin 'the-lambda-church/coquille'



"************ SYNTAX ANALYSERS ************"

" Syntax checker and error reporter
Plugin 'scrooloose/syntastic'

" Syntax analisis for ocaml
"Plugin 'the-lambda-church/merlin'



"******** SHELL AND INTERPRETERS  *********"

"Plugin 'Shougo/vimproc'

"Plugin 'Shougo/vimshell.vim'





call vundle#end()
filetype plugin indent on
syntax on
set t_Co=256




"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                           GLOBAL CONFIGURATION                              "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

set autoindent                  " Set auto indentation
set backspace=indent,eol,start  " Allow backspacing
set cinoptions+=j1,J1           " Set the c-indenting file
set cmdheight=1                 " Set the height of the command bar
set cursorline                  " Highlight the current line
set encoding=utf-8              " Set utf-8 as standard encoding
set expandtab                   " Replace tabs with spaces
set fileformats=unix
set ff=unix                     " Set unix as the standard file type
set hidden                      " Set buffers non deleted when abandoned
set hlsearch                    " Set highlight search results
set ignorecase                  " Ignore case for search
set laststatus=2                " Always show the status line
set lazyredraw                  " No redraw he interface when not utile
set list                        " Print spacing characters
set listchars=tab:\ \ ,trail:·
set magic                       " Better regex
set mouse=a                     " Disable mouse
set nobackup                    " Disable backup
set nofoldenable                " Disable Folding
set noswapfile                  " Disable Swap Files
set number                      " Display line number
set preserveindent              " Preserv local indentation
set ruler                       " Display the cursor position
set relativenumber              " Line number is relative to the position
set showcmd                     " Display the current command
set showmatch                   " Show corresponding bracket
set shiftround                  " Indent with a multiple au shiftwidth
set shiftwidth=4                " Set width indentation
set showbreak=                 " Set the breaking line symbol
set si
set softtabstop=4               " Set tabulations width
set smartindent                 " Smart indentation
set smarttab                    " Smart tabulations
set spelllang=fr,en             " Spell languages
set tabstop=4                   " Set tabulations width
set textwidth=79                " Line longer than 79 columns will be broken
set title                       " Show title
set ttyfast
set wildignore=*~,*.swp,*.class " Ignore
set wildignore+=*.o
set shell=/bin/zsh              " Set the shell used when executing commands in vim




"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                                FUNCTIONS                                    "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" GUI-Settings
if has("gui_running")
    set guifont=Inconsoloata\ for\ Powerline:h12
    let g:Powerline_symbols = 'fancy'
    set fillchars+=stl:\ ,stlnc:\

    if has("mac")
        set transparency=5
    endif
endif


" Set new indentation
function! Indentation(n)
  execute "set tabstop=".a:n
  execute "set softtabstop=".a:n
  execute "set shiftwidth=".a:n
endfunction



" Auto Commands
if has("autocmd")
    au FileType ocaml       call Indentation(2)
    au BufRead,BufNewFile *.pro set filetype=prolog

    "CursorLine only in active window
    augroup CursorLineOnlyInActiveWindow
      autocmd!
      autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline
      autocmd WinLeave * setlocal nocursorline
    augroup END

endif

" Reveals the actual word's syntaxique group
nmap <C-S-T> :call <SID>SynStack()<CR>
function! <SID>SynStack()
    if !exists("*synstack")
        return
    endif
    echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc





"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                                   MAPPING                                   "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"*********** MAPLEADER SETTING ***********"

" Set space to be the map leader
let mapleader=" "

"*************** NERD TREE ****************"

nmap <leader>nt :NERDTree<CR>
nmap <leader>nc :NERDTreeClose<CR>


"******** BUFFER TABS & WINDOW GESTION *********"

" Move to the next buffer
nmap <leader>bn :bnext<CR>

" Move to the previous buffer
nmap <leader>bp :bprevious<CR>

" Close the current buffer and move to the previous one
nmap <leader>bq :bp <BAR> bd #<CR>

" Close the current buffer, the current window
" and move to the previous one
nmap <leader>bQ :bp <BAR> bd #<CR> :q<CR>

" Move to the next buffer
nmap <leader>to :tab split<CR>

" Move to the next buffer
nmap <leader>tn :tabnext<CR>

" Move to the previous buffer
nmap <leader>tp :tabprevious<CR>

" Close the current buffer and move to the previous one
nmap <leader>tq :tabclose<CR>

" Close the current buffer, the current window
" and move to the previous one
nmap <leader>bQ :bp <BAR> bd #<CR> :q<CR>

" Show only the current buffer
nmap <leader>wo :only<CR>

" Move to the next window
nmap <leader>wn <C-w><C-w>

" Move to bottom window
nnoremap <C-J> <C-W>j

" Move to upper window
nnoremap <C-K> <C-W>k

" Move to right-side window
nnoremap <C-L> <C-W>l

" Move to left-side window
nnoremap <C-H> <C-W>h



"*********** EASY LINE EDITION ***********"

" Select all the document
nmap <leader>va gg<S-v>G

" Copy-up the line
nmap <C-a> yykp

" Copy-down the line
nmap <C-v> yyp

" Move-up the line
nmap <C-p> ddkkp

" Move-down the line
nmap <C-n> ddp

" Replace current word and enter in insert mode
nmap <leader>r bdei

" Insert a line-jump
nmap <CR> o<ESC>

" Insert a line-jump after the cursor
nmap <leader><CR> O<ESC>



"************* INTERPRETER **************"

" Open the VimShell Intera­ctive window
nmap <leader>io :VimShellInteractive<CR><ESC><C-w><C-w>

" Interpret the current paragraph
nmap <leader>ip vip:VimShellSendString<CR>

" Interpret the current line
nmap <leader>il vip:VimShellSendString<CR>


"************** FUCGITIVE ***************"

"nnoremap <space>ga :Git add %:p<CR><CR>
"nnoremap <space>gs :Gstatus<CR>
"nnoremap <space>gc :Gcommit -a<CR>
"nnoremap <space>gt :Gcommit -v -q %:p<CR>
"nnoremap <space>gd :Gdiff<CR>
"nnoremap <space>ge :Gedit<CR>
"nnoremap <space>gr :Gread<CR>
"nnoremap <space>gw :Gwrite<CR><CR>
"nnoremap <space>gl :silent! Glog<CR>:bot copen<CR>
"nnoremap <space>gm :Gmove<Space>
"nnoremap <space>gb :Git branch<Space>
"nnoremap <space>go :Git checkout<Space>
"nnoremap <space>gps :Dispatch! git push<CR>
"nnoremap <space>gpl :Dispatch! git pull<CR>
"nnoremap <leader>gg :!git log --pretty=format:"\%h - \%cn; \%cr : \%s" --graph<CR>
"nnoremap <space>gps :Git push<Space>
"nnoremap <space>gpl :Git pull<Space>



"*************** MERLIN ****************"

" Explains the type of an expression
" Show only the current buffer
nmap <leader>wo :only<CR>

" Move to the next window
nmap <leader>wn <C-w><C-w>

" Move to bottom window
nnoremap <C-J> <C-W>j

" Move to upper window
nnoremap <C-K> <C-W>k

" Move to right-side window
nnoremap <C-L> <C-W>l

" Move to left-side window
nnoremap <C-H> <C-W>h

"*********** COQ ***********"

map <leader>ql :CoqLaunch<CR>
map <leader>qn :CoqNext<CR>
map <leader>qu :CoqUndo<CR>
map <leader>qc :CoqToCursor<CR>
map <leader>qq :CoqKill<CR>


"*************** OTHERS ****************"

nnoremap <leader><leader> :nohlsearch<CR>

" Refresh vim comportment in reloading .vimrc
nmap <leader>vim :source ~/.vimrc<CR>



"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                        INSTANT MARKDOWN CONFIGURATION                       "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"let g:instant_markdown_slow = 1



"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                           ULTISNIPS CONFIGURATION                           "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

let g:UtilSnipsExpandTrigger="<tab>"




"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                           AIRLINE CONFIGURATION                             "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

let g:airline_theme             = 'wombat'
let g:airline_enable_branch     = 1
let g:airline_enable_syntastic  = 1
let g:airline_powerline_fonts   = 1
let g:airline_detect_whitespace = 0

" Enable the list of tablines
let g:airline#extensions#tabline#enabled = 1

" Enable displaying buffers with a single tab
let g:airline#extensions#tabline#show_buffers = 1

" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'

" Disable close button
let g:airline#extensions#tabline#show_close_button = 0

" Mappings to select tab/buffers
let g:airline#extensions#tabline#buffer_idx_mode = 1
nmap <leader>b1 <Plug>AirlineSelectTab1
nmap <leader>b2 <Plug>AirlineSelectTab2
nmap <leader>b3 <Plug>AirlineSelectTab3
nmap <leader>b4 <Plug>AirlineSelectTab4
nmap <leader>b5 <Plug>AirlineSelectTab5
nmap <leader>b6 <Plug>AirlineSelectTab6
nmap <leader>b7 <Plug>AirlineSelectTab7
nmap <leader>b8 <Plug>AirlineSelectTab8
nmap <leader>b9 <Plug>AirlineSelectTab9

nmap <leader>t1 1gt
nmap <leader>t2 2gt
nmap <leader>t3 3gt
nmap <leader>t4 4gt
nmap <leader>t5 5gt
nmap <leader>t6 6gt
nmap <leader>t7 7gt
nmap <leader>t8 8gt
nmap <leader>t9 9gt

"Tab numbers
let g:airline#extensions#tabline#tab_nr_type = 1



"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                               DELIMITE MATE                                 "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"Set the expansion of <CR> and <space>
let delimitMate_expand_space    = 1
let delimitMate_expand_cr       = 1

"Suppress simple quote completion in caml
if has("autocmd")
  au FileType ocaml let b:delimitMate_quotes = "\""
endif

"skip <CR> expansion on pop-up-menu
imap <expr> <CR> pumvisible()
                 \ ? "\<C-Y>"
                 \ : "<Plug>delimitMateCR"


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                                SYNTASTIC                                    "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" Check syntax on open
let g:syntastic_check_on_open = 1

let g:syntastic_ocaml_checkers = ['merlin']


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                               COMPLETION                                    "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


"*************** MERLIN ****************"

let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
execute "set rtp+=" . g:opamshare . "/merlin/vim"






"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                                                             "
"                               COLOR-SCHEME                                  "
"                                                                             "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

colorscheme Termina

I don't really know if the problem comes from vim-sacla or from vim in general, but it appears only if the plugin is installed (Scala files are well loaded if they are opened as a unix file).

Thank you for your help !

@derekwyatt
Copy link
Owner

                                                                                  To diagnose it, you'll have to disable everything and include just the vim-scala plugin. If you can reproduce this with a vimrc that contains nothing but:    set rtp+=/path/to/vim-scalaAnd possibly set nocompatible and filetype plugins on...Then we might be able to do something but you've got way too much here to say that it has anything to do with this plugin at all.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         From: PixelSpiritSent: Sunday, November 1, 2015 7:03 AMTo: derekwyatt/vim-scalaReply To: derekwyatt/vim-scalaSubject: [vim-scala] File manipulation problems (#113)Hy !

I'm uncountering problems during the opening and the saving of a scala file.

When I try to open a scala file, the status bar tels me that the file was well opened but the buffer remains empty. I always need to refresh the buffer by using the ctrc + c command, which is quite painful.
I have also this kind of problem during the saving of the file (by using :w). I always have to refresh the buffer manualy.

I tried to uninstall and reinstall your great plugin with Vundle but the problem persists.

Here is my vim --version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 21 2015 12:32:09)
MacOS X (unix) version
Included patches: 1-488
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent -gettext -mzscheme +textobjects
-clientserver -hangul_input +netbeans_intg +title
+clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu +ruby +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape -sniff -xsmp
+eval +mouse_dec +startuptime -xterm_clipboard
+ex_extra -mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H -F/usr/local/Frameworks -DMACOS_X_UNIX -Os -w -pipe -march=native -mmacosx-version-min=10.10 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang -L. -L/usr/local/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names -o vim -lm -lncurses -liconv -framework Cocoa -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -framework Python -lruby.2.0.0 -lobjc

I wonder if the problem could come from an incompatibility with other plugins.
In dubt, here is also my .vimrc configuration :

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" PLUGINS "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

set nocompatible
filetype off

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

"***************** VUNDLE *****************"

" Vundle itself
Plugin 'gmarik/Vundle.vim'

"**************** UTILITY *****************"

" Better status bar
Plugin 'bling/vim-airline'

" Easy commenting
Plugin 'scrooloose/nerdcommenter'

" Git gestion
"Plugin 'tpope/vim-fugitive'

" Add and change surrounding brackets
Plugin 'tpope/vim-surround'

" Brackets automatisation
Plugin 'Raimondi/delimitMate'

" XMate-like folder navigation
Plugin 'scrooloose/nerdtree'

"Doxygen
Plugin 'DoxygenToolkit.vim'

"Markdown
"Plugin 'suan/vim-instant-markdown'

"************ SNIPPETS GESTION ************"

" Snippets Engine
Plugin 'vim-scripts/UltiSnips'

" Snippets Library
Plugin 'honza/vim-snippets'

"********* LANGUAGE COMPATIBILITY *********"

" Prolog
"Plugin 'adimit/prolog.vim'

"Scala
Plugin 'derekwyatt/vim-scala'

" Coq
"Plugin 'the-lambda-church/coquille'

"************ SYNTAX ANALYSERS ************"

" Syntax checker and error reporter
Plugin 'scrooloose/syntastic'

" Syntax analisis for ocaml
"Plugin 'the-lambda-church/merlin'

"******** SHELL AND INTERPRETERS *********"

"Plugin 'Shougo/vimproc'

"Plugin 'Shougo/vimshell.vim'

call vundle#end()
filetype plugin indent on
syntax on
set t_Co=256

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" GLOBAL CONFIGURATION "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

set autoindent " Set auto indentation
set backspace=indent,eol,start " Allow backspacing
set cinoptions+=j1,J1 " Set the c-indenting file
set cmdheight=1 " Set the height of the command bar
set cursorline " Highlight the current line
set encoding=utf-8 " Set utf-8 as standard encoding
set expandtab " Replace tabs with spaces
set fileformats=unix
set ff=unix " Set unix as the standard file type
set hidden " Set buffers non deleted when abandoned
set hlsearch " Set highlight search results
set ignorecase " Ignore case for search
set laststatus=2 " Always show the status line
set lazyredraw " No redraw he interface when not utile
set list " Print spacing characters
set listchars=tab:\ \ ,trail:·
set magic " Better regex
set mouse=a " Disable mouse
set nobackup " Disable backup
set nofoldenable " Disable Folding
set noswapfile " Disable Swap Files
set number " Display line number
set preserveindent " Preserv local indentation
set ruler " Display the cursor position
set relativenumber " Line number is relative to the position
set showcmd " Display the current command
set showmatch " Show corresponding bracket
set shiftround " Indent with a multiple au shiftwidth
set shiftwidth=4 " Set width indentation
set showbreak=↪ " Set the breaking line symbol
set si
set softtabstop=4 " Set tabulations width
set smartindent " Smart indentation
set smarttab " Smart tabulations
set spelllang=fr,en " Spell languages
set tabstop=4 " Set tabulations width
set textwidth=79 " Line longer than 79 columns will be broken
set title " Show title
set ttyfast
set wildignore=~,.swp,.class " Ignore
set wildignore+=
.o
set shell=/bin/zsh " Set the shell used when executing commands in vim

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" FUNCTIONS "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" GUI-Settings
if has("gui_running")
set guifont=Inconsoloata\ for\ Powerline:h12
let g:Powerline_symbols = 'fancy'
set fillchars+=stl:\ ,stlnc:\

if has("mac")
    set transparency=5
endif

endif

" Set new indentation
function! Indentation(n)
execute "set tabstop=".a:n
execute "set softtabstop=".a:n
execute "set shiftwidth=".a:n
endfunction

" Auto Commands
if has("autocmd")
au FileType ocaml call Indentation(2)
au BufRead,BufNewFile *.pro set filetype=prolog

"CursorLine only in active window
augroup CursorLineOnlyInActiveWindow
  autocmd!
  autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline
  autocmd WinLeave * setlocal nocursorline
augroup END

endif

" Reveals the actual word's syntaxique group
nmap :call SynStack()
function! SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" MAPPING "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"*********** MAPLEADER SETTING ***********"

" Set space to be the map leader
let mapleader=" "

"*************** NERD TREE ****************"

nmap nt :NERDTree
nmap nc :NERDTreeClose

"******** BUFFER TABS & WINDOW GESTION *********"

" Move to the next buffer
nmap bn :bnext

" Move to the previous buffer
nmap bp :bprevious

" Close the current buffer and move to the previous one
nmap bq :bp bd #

" Close the current buffer, the current window
" and move to the previous one
nmap bQ :bp bd # :q

" Move to the next buffer
nmap to :tab split

" Move to the next buffer
nmap tn :tabnext

" Move to the previous buffer
nmap tp :tabprevious

" Close the current buffer and move to the previous one
nmap tq :tabclose

" Close the current buffer, the current window
" and move to the previous one
nmap bQ :bp bd # :q

" Show only the current buffer
nmap wo :only

" Move to the next window
nmap wn

" Move to bottom window
nnoremap j

" Move to upper window
nnoremap k

" Move to right-side window
nnoremap l

" Move to left-side window
nnoremap h

"*********** EASY LINE EDITION ***********"

" Select all the document
nmap va ggG

" Copy-up the line
nmap yykp

" Copy-down the line
nmap yyp

" Move-up the line
nmap ddkkp

" Move-down the line
nmap ddp

" Replace current word and enter in insert mode
nmap r bdei

" Insert a line-jump
nmap o

" Insert a line-jump after the cursor
nmap O

"************* INTERPRETER **************"

" Open the VimShell Intera­ctive window
nmap io :VimShellInteractive

" Interpret the current paragraph
nmap ip vip:VimShellSendString

" Interpret the current line
nmap il vip:VimShellSendString

"************** FUCGITIVE ***************"

"nnoremap ga :Git add %:p
"nnoremap gs :Gstatus
"nnoremap gc :Gcommit -a
"nnoremap gt :Gcommit -v -q %:p
"nnoremap gd :Gdiff
"nnoremap ge :Gedit
"nnoremap gr :Gread
"nnoremap gw :Gwrite
"nnoremap gl :silent! Glog:bot copen
"nnoremap gm :Gmove
"nnoremap gb :Git branch
"nnoremap go :Git checkout
"nnoremap gps :Dispatch! git push
"nnoremap gpl :Dispatch! git pull
"nnoremap gg :!git log --pretty=format:"%h - %cn; %cr : %s" --graph
"nnoremap gps :Git push
"nnoremap gpl :Git pull

"*************** MERLIN ****************"

" Explains the type of an expression
" Show only the current buffer
nmap wo :only

" Move to the next window
nmap wn

" Move to bottom window
nnoremap j

" Move to upper window
nnoremap k

" Move to right-side window
nnoremap l

" Move to left-side window
nnoremap h

"*********** COQ ***********"

map ql :CoqLaunch
map qn :CoqNext
map qu :CoqUndo
map qc :CoqToCursor
map qq :CoqKill

"*************** OTHERS ****************"

nnoremap :nohlsearch

" Refresh vim comportment in reloading .vimrc
nmap vim :source ~/.vimrc

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" INSTANT MARKDOWN CONFIGURATION "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"let g:instant_markdown_slow = 1

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" ULTISNIPS CONFIGURATION "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

let g:UtilSnipsExpandTrigger=""

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" AIRLINE CONFIGURATION "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

let g:airline_theme = 'wombat'
let g:airline_enable_branch = 1
let g:airline_enable_syntastic = 1
let g:airline_powerline_fonts = 1
let g:airline_detect_whitespace = 0

" Enable the list of tablines
let g:airline#extensions#tabline#enabled = 1

" Enable displaying buffers with a single tab
let g:airline#extensions#tabline#show_buffers = 1

" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'

" Disable close button
let g:airline#extensions#tabline#show_close_button = 0

" Mappings to select tab/buffers
let g:airline#extensions#tabline#buffer_idx_mode = 1
nmap b1 AirlineSelectTab1
nmap b2 AirlineSelectTab2
nmap b3 AirlineSelectTab3
nmap b4 AirlineSelectTab4
nmap b5 AirlineSelectTab5
nmap b6 AirlineSelectTab6
nmap b7 AirlineSelectTab7
nmap b8 AirlineSelectTab8
nmap b9 AirlineSelectTab9

nmap t1 1gt
nmap t2 2gt
nmap t3 3gt
nmap t4 4gt
nmap t5 5gt
nmap t6 6gt
nmap t7 7gt
nmap t8 8gt
nmap t9 9gt

"Tab numbers
let g:airline#extensions#tabline#tab_nr_type = 1

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" DELIMITE MATE "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"Set the expansion of and
let delimitMate_expand_space = 1
let delimitMate_expand_cr = 1

"Suppress simple quote completion in caml
if has("autocmd")
au FileType ocaml let b:delimitMate_quotes = """
endif

"skip expansion on pop-up-menu
imap pumvisible()
\ ? ""
\ : "delimitMateCR"

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" SYNTASTIC "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" Check syntax on open
let g:syntastic_check_on_open = 1

let g:syntastic_ocaml_checkers = ['merlin']

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" COMPLETION "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

"*************** MERLIN ****************"

let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
execute "set rtp+=" . g:opamshare . "/merlin/vim"

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" COLOR-SCHEME "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

colorscheme Termina

I don't really know if the problem comes from vim-sacla or from vim in general, but it appears only if the plugin is installed.

Thank you for your help !

—Reply to this email directly or view it on GitHub.

@n-raymond
Copy link
Author

Thank you for your quick answer !
I tried to reduce the vimrc and the problem disapear. I'll try to isolate the part of the configuration which causes the problem.

Thank you for your help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants