Maximus5 / cygwin-connector

https://conemu.github.io/ terminal connector for cygwin/msys
https://conemu.github.io/en/CygwinMsysConnector.html
Other
82 stars 5 forks source link

vim inoperable #7

Open erichiller opened 8 years ago

erichiller commented 8 years ago

Color scheme seems to be working fine, but navigation is a no go. I can't exit I have to kill the task in order to leave. It also only takes up a small portion of the screen (24 lines). Enter works, characters work, arrow keys do not. Escape must not since I can not get to :q

Let me know what other information you'd like. Newest connector, newest conemu.

Maximus5 commented 8 years ago
  1. dumpbin /IMPORTS vim.exe
  2. screenshot of vim in conemu
  3. vimrc
erichiller commented 8 years ago

console output vim

Here's my .vimrc

" Setting some decent VIM settings for programming

set showmatch                   " automatically show matching brackets. works like it does in bbedit.
set vb                          " turn on the "visual bell" - which is much quieter than the "audio blink"
set ruler                       " show the cursor position all the time
set laststatus=2                " make the last line (status) two lines deep so you can always see status 
set backspace=indent,eol,start  " make that backspace key work the way it should
set nocompatible                " vi compatible is LAME
set background=dark             " Use colours that work well on a dark background (Console is usually black)
set showmode                    " show the current mode
syntax on                       " turn syntax highlighting on by default
set hlsearch                    " highlight search terms

" EDH ---- force tabs, not spaces ----
set autoindent                  " set auto-indenting on for programming; filetype plugin should
                                " override this for smartindent / cindent depending on filetype
                                " see: http://vim.wikia.com/wiki/Indenting_source_code
set noexpandtab
set tabstop=4                   " EDH - standard 4 space=tab
set shiftwidth=4                " Number of spaces to use for each step of (auto)indent.

filetype plugin indent on       " Enable file type detection. to automatically do language-dependent indenting.

set number                      " Show line numbers.
set mouse=a                     " Enable the use of the mouse.
set history=50                  " keep 50 lines of command line history
set showcmd                     " display incomplete commands
set incsearch                   " do incremental searching

" Show EOL type and last modified timestamp, right after the filename
set statusline=%<%F%h%m%r\ %y\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))})%=%l,%c%V\ %P

" Set up .md as markdown as well
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown

"------------------------------------------------------------------------------
" Only do this part when compiled with support for autocommands.
if has("autocmd")

    "Set UTF-8 as the default encoding for commit messages
    autocmd BufReadPre COMMIT_EDITMSG,git-rebase-todo setlocal fileencodings=utf-8

    "Remember the positions in files with some git-specific exceptions"
    autocmd BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$")
      \           && expand("%") !~ "COMMIT_EDITMSG"
      \           && expand("%") !~ "ADD_EDIT.patch"
      \           && expand("%") !~ "addp-hunk-edit.diff"
      \           && expand("%") !~ "git-rebase-todo" |
      \   exe "normal g`\"" |
      \ endif

      autocmd BufNewFile,BufRead *.patch set filetype=diff
      autocmd BufNewFile,BufRead *.diff set filetype=diff

      autocmd Syntax diff
      \ highlight WhiteSpaceEOL ctermbg=red |
      \ match WhiteSpaceEOL /\(^+.*\)\@<=\s\+$/

      autocmd Syntax gitcommit setlocal textwidth=74
endif " has("autocmd")

" ConEmu
if !empty($CONEMUBUILD)
    set termencoding=utf8
    set term=pcansi
    set t_Co=256
    let &t_AB="\e[48;5;%dm"
    let &t_AF="\e[38;5;%dm"
    colorscheme delek " best I found, other considerations:
    " darkblue
    " slate
    " murphy
    " desert
    " koehler
    " zellner
endif

Hope that helps. I do not have dumpbin and from what I could tell it is a component of visual studio which I do not have. Thanks! -Eric

Maximus5 commented 8 years ago

Where you've seen recommendation to set term=pcansi?

https://conemu.github.io/en/VimXterm.html

erichiller commented 8 years ago

A fix long ago, was the only way I could get something working. I no longer remember the details. It was maybe even something in cmd or powershell I really don't remember.

I changed it to:

    "set term=pcansi
    set term=xterm

And it still did the same

Maximus5 commented 8 years ago

Still need list of imports of your vim. Well, list of dlls from ProcessExplorer is suitable, process execution tree would be nice too. Any, what is vim version?

erichiller commented 8 years ago
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 14:33:40)
MS-Windows 32-bit console version
Compiled by mool@tororo
Big version without GUI.  Features included (+) or not (-):
+arabic          +ex_extra        -mouseshape      +tag_binary
+autocmd         +extra_search    +multi_byte      +tag_old_static
-balloon_eval    +farsi           +multi_lang      -tag_any_white
-browse          +file_in_path    -mzscheme        -tcl
++builtin_terms  +find_in_path    -netbeans_intg   -tgetent
+byte_offset     +float           +path_extra      -termresponse
+cindent         +folding         -perl            +textobjects
+clientserver    -footer          +persistent_undo +title
+clipboard       +gettext/dyn     -postscript      -toolbar
+cmdline_compl   -hangul_input    +printer         +user_commands
+cmdline_hist    +iconv/dyn       -profile         +vertsplit
+cmdline_info    +insert_expand   -python          +virtualedit
+comments        +jumplist        -python3         +visual
+conceal         +keymap          +quickfix        +visualextra
+cryptv          +langmap         +reltime         +viminfo
+cscope          +libcall         +rightleft       +vreplace
+cursorbind      +linebreak       -ruby            +wildignore
+cursorshape     +lispindent      +scrollbind      +wildmenu
+dialog_con      +listcmds        +signs           +windows
+diff            +localmap        +smartindent     +writebackup
+digraphs        -lua             -sniff           -xfontset
-dnd             +menu            +startuptime     -xim
-ebcdic          +mksession       +statusline      -xterm_save
+emacs_tags      +modify_fname    -sun_workshop    -xpm_w32
+eval            +mouse           +syntax
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE       -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.\ObjCi386/ /Ox /GL -DNDEBUG  /Zl /MT -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_BIG /Fd.\ObjCi386/ /Zi
Linking: link /RELEASE /nologo /subsystem:console /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib uuid.lib /machine:i386 /nodefaultlib  libcmt.lib   user32.lib             /PDB:vim.pdb -debug

image

Maximus5 commented 8 years ago

That's wrong vim! Proper one from msys2 packages is linked with msys2-0.dll.

Maximus5 commented 8 years ago

Also, I do not see paths of bash.exe and sh.exe, but seems like you've specified wrong startup command for your tab - too many shells.

erichiller commented 8 years ago

I was running win32 vim as it was one of the ones specificied as working whereas msys's was not listed. I now have vim-msys for msys and vim-win32 for cmd and powershell working. The reason for the extra bash/sh above vim before was that I had a 'helper' script to open it prior, that is no longer required thanks to your connector.

erichiller commented 8 years ago

I have everything going except the arrow keys/mouse. I have the msys and windows installed side-by-side. Attached. I have the msys version selected. No more wrapper script.

image

" Setting some decent VIM settings for programming

set showmatch                   " automatically show matching brackets. works like it does in bbedit.
set vb                          " turn on the "visual bell" - which is much quieter than the "audio blink"
set ruler                       " show the cursor position all the time
set laststatus=2                " make the last line (status) two lines deep so you can always see status 
set backspace=indent,eol,start  " make that backspace key work the way it should
set nocompatible                " vi compatible is LAME
set background=dark             " Use colours that work well on a dark background (Console is usually black)
set showmode                    " show the current mode
syntax on                       " turn syntax highlighting on by default
set hlsearch                    " highlight search terms

" EDH ---- force tabs, not spaces ----
set autoindent                  " set auto-indenting on for programming; filetype plugin should
                                " override this for smartindent / cindent depending on filetype
                                " see: http://vim.wikia.com/wiki/Indenting_source_code
set noexpandtab
set tabstop=4                   " EDH - standard 4 space=tab
set shiftwidth=4                " Number of spaces to use for each step of (auto)indent.

filetype plugin indent on       " Enable file type detection. to automatically do language-dependent indenting.

set number                      " Show line numbers.
set mouse=a                     " Enable the use of the mouse.
set history=50                  " keep 50 lines of command line history
set showcmd                     " display incomplete commands
set incsearch                   " do incremental searching

" Show EOL type and last modified timestamp, right after the filename
set statusline=%<%F%h%m%r\ %y\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))})%=%l,%c%V\ %P

" Set up .md as markdown as well
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown

"------------------------------------------------------------------------------
" Only do this part when compiled with support for autocommands.
if has("autocmd")

    "Set UTF-8 as the default encoding for commit messages
    autocmd BufReadPre COMMIT_EDITMSG,git-rebase-todo setlocal fileencodings=utf-8

    "Remember the positions in files with some git-specific exceptions"
    autocmd BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$")
      \           && expand("%") !~ "COMMIT_EDITMSG"
      \           && expand("%") !~ "ADD_EDIT.patch"
      \           && expand("%") !~ "addp-hunk-edit.diff"
      \           && expand("%") !~ "git-rebase-todo" |
      \   exe "normal g`\"" |
      \ endif

      autocmd BufNewFile,BufRead *.patch set filetype=diff
      autocmd BufNewFile,BufRead *.diff set filetype=diff

      autocmd Syntax diff
      \ highlight WhiteSpaceEOL ctermbg=red |
      \ match WhiteSpaceEOL /\(^+.*\)\@<=\s\+$/

      autocmd Syntax gitcommit setlocal textwidth=74
endif " has("autocmd")

" ConEmu

if $TERM ==# "xterm-256color"
    set term=xterm
else
    set term=pcansi
endif

"set term=xterm-256color
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
colorscheme delek " best I found, other considerations:
" darkblue
" slate
" murphy
" desert
" koehler
"colorscheme zellner

set termencoding=utf8

" mouse wheel
inoremap <Esc>[62~ <C-X><C-E>
inoremap <Esc>[63~ <C-X><C-Y>
nnoremap <Esc>[62~ <C-E>
nnoremap <Esc>[63~ <C-Y>

And I checked that my vimrc if xterm statement is working, and it is. I think I have all your settings copied don't I?