SOLVED Vim indent (Groovy)

Hi people!
I try to use this script http://www.vim.org/scripts/script.php?script_id=2961 . I copy this file in /usr/share/vim/vim73/indent
but I have this error when open a file *.groovy
Error detected while processing /usr/share/vim/vim73/indent/groovy.vim:
line    5:
E492: Not an editor command: ^M
line    7:
E15: Invalid expression: exists("b:did_indent")^M
line  164:
E171: Missing :endif
Press ENTER or type command to continue
The script looks ok. I can't figure out what's going on.
Thanks in advance.
Last edited by Horris (2010-09-30 02:08:59)

'^M' are end-of-line marks for dos - remove them: http://www.tech-recipes.com/rx/150/remo … nes-in-vi/
Last edited by karol (2010-09-30 02:02:04)

Similar Messages

  • [Solved] vim, indent and hash

    I know this isn't strictly a programming problem, but bear with me...
    To make a long story short, I have a Perl file in which some comment lines start with the hash(#) as the first character of the line, i.e. before the # there's nothing, not even spaces. The problem is that trying to indent this line with == does not work. Now, with my current vim setup, when *insert* a new line that starts with an #, indentation is done properly. Also, if there is space before the #, but the indentation is wrong, == correctly indents it. The problem is when the # is the very first character of the line, and (it goes without saying) the indentation is wrong, == does nothing.
    I've googled and read all about disabling smartindent, cindent, and whatnot, and nothing seems to work. I'm really grasping at the straws with this one, so all ideas are welcome...
    Last edited by gauthma (2010-10-26 16:22:11)

    For future reference of whomever might encouter this problem... the file /usr/share/vim/vim73/indent/perl.vim has, in line 55 and following, the, erm, following:
    " Don't reindent coments on first column
    if cline =~ '^#.'
    return 0
    endif
    Commenting those out solved the problem. Of course I now wonder why would those lines be there in the first place, but I digress...

  • [solved] vim ftplugin vim-latexsuite doesn't load changes with chars

    Hello!
    I'd like to use some european characters and I found this thread.
    Unfortunately I still get "/mathbf{}" when I type the ã. (My problem is the ö but I think if I manage to have the ã it will work with ö...)
    The second problem is that I have to press escape twice to go to normal mode in a .tex file.
    (In the other files one press is enough.)
    All these troubles happen only on my x86_64 desktop.
    I have vim-latexsuit-svn 1106-1 on both laptop and desktop from the AUR.
    On my i686 laptop everything works fine with the 'default' .vimrc advised in the vim-latexsuite-manual.
    There is also a different mapleader for compiling by default. (Which is not as annoying as the ö problem.)
    I also get the ö-trouble when I log in from the laptop to my desktop.
    Why are there so much differences?
    I only remember having put some "set winaltkeys=no" in the wrong files on my laptop before I understood where is the right place.
    (Where everything works fine.)
    Here's my .vimrc
    1 set tabstop=2
    2 set number
    3
    4 syntax on
    5 filetype plugin on
    6 filetype indent on
    7 set grepprg=grep\ -nH\ $*
    8 let g:tex_flavor = "latex"
    9 set runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,~/.vim/after
    10 "To solve the propleme with vim-latexsuite has with ã and â
    11 imap <buffer> <silent> <M-C> <Plug>Tex_MathCal
    12 imap <buffer> <silent> <M-B> <Plug>Tex_MathBF
    13 imap <buffer> <leader>it <Plug>Tex_InsertItemOnThisLine
    14 imap <buffer> <silent> <M-A> <Plug>Tex_InsertItem
    15 "imap <buffer> <silent> <M-E> <Plug>Tex_InsertItem
    16 "imap <buffer> <silent> <M-e> <Plug>Tex_InsertItemOnThisLine
    17 imap <buffer> <silent> <Plug>Traditional <Plug>Traditional
    18 map <buffer> <silent> é é
    19 map <buffer> <silent> á á
    20 map <buffer> <silent> ã ã
    21 "imap ã <Plug>Tex_MathCal
    22 "imap é <Plug>Traditional
    ~/.vim/ftplugin/tex.vim
    1 set winaltkeys=no
    2
    3 let g:Tex_AdvancedMath = 0
    4 let g:Tex_SmartKeyQuote = 0
    5 let g:Tex_SmartKeyQuote = 0
    6
    7 imap <C-b> <Plug>Tex_MathBF
    8 imap <C-c> <Plug>Tex_MathCal
    9 imap <C-l> <Plug>Tex_LeftRight
    ~/.vim/after/ftplugin/tex.vim
    (The macros of call IMAP work well. When I type `ö I also get a \mathbf)
    1 call IMAP('`w', '\omega', 'tex')
    2 call IMAP('`j', '\cdot', 'tex')
    3 call IMAP('`A', '\forall', 'tex')
    4 call IMAP('`E', '\exists', 'tex')
    5 call IMAP('`ö', 'ö', 'tex')
    6
    7 let g:Tex_AdvancedMath = 0
    8 imap <C-b> <Plug>Tex_MathBF
    9 imap <C-c> <Plug>Tex_MathCal
    10 imap <C-l> <Plug>Tex_LeftRight
    runtimepath:
    runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,~/.vim/after
    Last edited by Maximalminimalist (2010-05-30 17:00:03)

    I just removed vim, vim-auctex (didn't remember there was this...) and vim-latexsuite and reinstalled vim and vim-latexsuite.
    I was obviously using a vim-auctex macro and I didn't know it... (This was a memorable lesson for removing packages you don't need. )
    I realized that the Esc-issue happens if a placeholder is still active. Is it possible to change this behaviour? (I won't really care about that. => [solved])
    Last edited by Maximalminimalist (2010-05-30 16:59:32)

  • [SOLVED] `Vim/Gvim: set mouse=a works only in Gvim?

    I'm diving into the world of (g)vim this weekend and although I'm starting to get the hang of things, I seem to be having a problem with the mouse functionality.  I have set mouse=a specified in my .vimrc and gvim respects it, but when I run vi in a terminal session (urxvt) I have to explicitly type :set mouse=a in ex mode before it will work.  Am I missing something?
    Here's what I've got in my .vimrc (linked also ~/.gvimrc) so far:
    " (G)vim settings
    set nocompatible " use gVim defaults
    colorscheme wombat " define syntax color scheme
    syntax on " enable syntax highlighting
    set mouse=a " make sure mouse is used in all cases.
    set backspace=2 " full backspacing capabilities
    set nocindent " set C style indenting off
    set cmdheight=2 " command line height
    set ignorecase " ignore case in search patterns
    set laststatus=2 " occasions to show status line, 2=always.
    set ruler " ruler display in status line
    set showmode " show mode at bottom of screen
    set number " toggle line numbers
    set nobackup " disable backup files (filename~)
    set hlsearch " highlight all search results
    set showmatch " show matching brackets (),{},[]
    " Gvim Settings
    set guioptions-=T " disable toolbar icons
    set guifont=Consolas\ 8 " backslash any spaces
    SOLVED: Silly me I was running 'vi' which has no X support... pacman -S vim fixed it fine.
    Last edited by thayer.w (2007-09-04 00:02:49)

    I just had an issue with no sound after recent updates.  Not sure it's the same problem you are having. 
    I found I had to open Audio Mixer, select Sound card: HDA Intel PCH (Alsa mixer), Select Controls, check box for Speaker and check box for Headphones.  After doing this I found the Speaker volume was set at minimum (although Master and PCM were already set at maximum).  Adjusted Speaker volume up and I finally had sound again.

  • [Solved][VIM] E484: Can't open file syntax.vim

    Hi all,
    I've installed Archlinux few days ago on my netbook and yesterday i decided to configure Vim using plugins.
    During plugins configuration, i messed up and i decided to revome all Vim files in my ~ folder in order to restart configuration.
    However, since I've executed the `rm -R .vim .vimrc .viminfo` command, I can't re-activate Vim's syntax coloration using `syntax on` into my .vimrc file nor into Vim directly.
    Here is the error message when I start Vim :
    Error detected while processing /home/romain/.vimrc:
    line 1:
    E484: Can't open file /home/romain/.vim/syntax/syntax.vim
    Press ENTER or type command to continue
    I've found this topic on BBS which seems to be the same problem as me but reinstalling vim or vi doesn't solve this problem.
    I've tried to copy this syntax.vim file from /usr/share/vim/vim73/syntax/syntax.vim but it doesn't solve the problem and I want a clean solution without hacking my ~ folder ; moreover, this bug also appears being root while I haven't configured vim with the root account so it may be a problem into Vim's installation folders or something.
    Thanks for your help and sorry I my english contains mistakes,
    MicroJoe.
    Last edited by MicroJoe (2012-06-14 16:16:45)

    This is the output :
    VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 7 2012 00:41:40)
    Rustines incluses : 1-547
    Compilé par ArchLinux
    Grosse version sans interface graphique.
    Fonctionnalités incluses (+) ou non (-) :
    +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
    -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
    +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
    -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
    +find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv
    +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
    +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
    +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
    +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme -netbeans_intg
    +path_extra +perl +persistent_undo +postscript +printer -profile -python
    -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
    -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
    +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
    -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
    +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
    -xterm_clipboard -xterm_save
    fichier vimrc système : "/etc/vimrc"
    fichier vimrc utilisateur : "$HOME/.vimrc"
    fichier exrc utilisateur : "$HOME/.exrc"
    $VIM par défaut : "/usr/share/vim"
    Compilation : gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/local/include -march=i686 -mtune=generic -pipe -fstack-protector --param=ssp-buffer-size=4 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
    Édition de liens : gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/local/lib -Wl,--as-needed -o vim -lm -lncurses -lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -fstack-protector -L/usr/local/lib -L/usr/lib/perl5/core_perl/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    (I've noticed that some part were in French but I hope that it'll not be a problem).

  • [SOLVED] VIM: different syntax highlighting for new vs existing file

    I've had this minor nagging issue for a while that I've been trying to figure out, but I just don't know where to look.
    It is most obvious with LaTeX files (*.tex).  When I create a new file with "vim file.tex" it is recognized as a latex file and I get syntax highlighting, but it seems odd, or off.  When I close then reopen the same file, it gets "propper" syntax highlighting.
    I gather that this must be because of the two different mechanisms for matching the syntax type: filename versus content.  When the file is new, vim only uses the extension.  Once there is a latex comand (e.g., "\documentclass{article}") it recognizes it as something else and the highlighting style is different.
    It turns out just by actually elaborating exactly what the problem was, I was able to find the solution.  I looked for how vim recognizes the files, and found two relevant lines in /usr/share/vim/vim73/filetype.vim on lines 2093 and 2094.  Apparently the .tex filetype is not the same as .latex and others.  I changed it so it was, and I got the desired behavior.
    I thought about just not posting this - but it may be useful for others.

    You're right about it being overridden.  This change should be able to be placed in ~/.vimrc though.
    Well  that was foolish - I should have read the comments right below in that file.  It says exactly how to set it in vimrc.  I've now added the following to my ~/.vimrc and this is completely solved without modifying the /usr/... file.
    let g:tex_flavor = "tex"
    Last edited by Trilby (2013-03-29 16:11:26)

  • [SOLVED]VIM errors

    When running VIM  i get those errors
    Subroutine new redefined at perl/TagsBase.vim line 36 (#1)
    (W redefine) You redefined a subroutine. To suppress this warning, say
    no warnings 'redefine';
    eval "sub name { ... }";
    Subroutine getBase redefined at perl/TagsBase.vim line 48 (#1)
    Subroutine sortBase redefined at perl/TagsBase.vim line 61 (#1)
    Subroutine pushTag redefined at perl/TagsBase.vim line 71 (#1)
    Subroutine getTag redefined at perl/TagsBase.vim line 82 (#1)
    Subroutine initBase redefined at perl/TagsBase.vim line 114 (#1)
    Subroutine new redefined at perl/TagsBase.vim line 124 (#1)
    Subroutine Line redefined at perl/TagsBase.vim line 129 (#1)
    Subroutine Name redefined at perl/TagsBase.vim line 135 (#1)
    Subroutine Type redefined at perl/TagsBase.vim line 141 (#1)
    Subroutine logFloorMenu redefined at perl/TagsBase.vim line 158 (#1)
    Subroutine ComputeMenu redefined at perl/TagsBase.vim line 166 (#1)
    Subroutine parseTags redefined at perl/TagsBase.vim line 238 (#1)
    Subroutine BuildBase redefined at perl/TagsBase.vim line 307 (#1)
    Subroutine GetTag redefined at perl/TagsBase.vim line 388 (#1)
    Subroutine GetTagType redefined at perl/TagsBase.vim line 400 (#1)
    Subroutine GetTagName redefined at perl/TagsBase.vim line 413 (#1)
    so, how to fix this?
    Last edited by lutherus (2012-02-11 11:24:57)

    Runiq wrote:
    lutherus wrote:Can an moderator mark this as solved?
    You can mark it yourself, just edit your first post and add a [Solved] in front of its title.
    OK, thx, didn`t know this.

  • [SOLVED] vim completion menu broken

    Since I upgraded to the latest vim (version 7.3.138, using the gvim package), the completion menu seems to be broken.
    Steps of replication:
    1. Stand in directory containing files test{1,5}
    2. Open vim
    3. :e t<tab>
    By now vim should show the completion menu saying that there are five files to choose from, but instead the cursor places itself in the file where I last left input, the command area is cleared and no completion is shown. If I enter anything, the cursor returns to the command line and the command line is redrawn with whatever I enter. If I press tab again, the cursor returns to the command area returns and redraws ":e test", nothing further happens.
    The error appears in both terminal vim and in gvim, and persists even if I reinstall using the regular vim package. I ruled out my configs breaking it by resetting them to a couple of months ago, but it didn't help.
    vim --version && pacman -Qi gvim:
    http://paste.pocoo.org/show/358834/
    Is anyone else getting this?
    EDIT && SOLVED:
    It was my configurations after all. "set wildmenu list:longest" made it break for some reason. Without it everything is peachy. \o/
    Last edited by Daethorian (2011-03-24 10:49:26)

    Since I upgraded to the latest vim (version 7.3.138, using the gvim package), the completion menu seems to be broken.
    Steps of replication:
    1. Stand in directory containing files test{1,5}
    2. Open vim
    3. :e t<tab>
    By now vim should show the completion menu saying that there are five files to choose from, but instead the cursor places itself in the file where I last left input, the command area is cleared and no completion is shown. If I enter anything, the cursor returns to the command line and the command line is redrawn with whatever I enter. If I press tab again, the cursor returns to the command area returns and redraws ":e test", nothing further happens.
    The error appears in both terminal vim and in gvim, and persists even if I reinstall using the regular vim package. I ruled out my configs breaking it by resetting them to a couple of months ago, but it didn't help.
    vim --version && pacman -Qi gvim:
    http://paste.pocoo.org/show/358834/
    Is anyone else getting this?
    EDIT && SOLVED:
    It was my configurations after all. "set wildmenu list:longest" made it break for some reason. Without it everything is peachy. \o/
    Last edited by Daethorian (2011-03-24 10:49:26)

  • [SOLVED] vim symbol lookup error

    Hi, i have this error when i try to run vim :
    vim: symbol lookup error: vim: undefined symbol: Perl_xs_apiversion_bootcheck
    dont know if it has to be with my older version of perl (dont have any dependency problems), but i really would try to avoid updating that if possible.
    hope someone has any insight in how to solve this, thanks.
    64 bits
    uname -r : 3.1.5-1-ARCH
    vim 7.3.353-2
    vim-runtime 7.3.353-2
    perl 5.12.3-1
    EDIT: Solved the issue by recompiling the vim package from ABS
    Last edited by andreamer (2011-12-25 19:37:00)

    andreamer wrote:older version of perl
    andreamer wrote:perl 5.12.3-1
    andreamer wrote:dont have any dependency problems
    Now you do.
    $ readelf -d /usr/bin/vim
    Dynamic section at offset 0x1dcda0 contains 31 entries:
    Tag Type Name/Value
    0x0000000000000001 (NEEDED) Shared library: [libSM.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libICE.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libXt.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libX11.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libncursesw.so.5]
    0x0000000000000001 (NEEDED) Shared library: [libacl.so.1]
    0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
    0x0000000000000001 (NEEDED) Shared library: [libperl.so]
    0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libpython2.7.so.1.0]
    0x000000000000000c (INIT) 0x422a30
    0x000000000000000d (FINI) 0x584598
    0x000000006ffffef5 (GNU_HASH) 0x400298
    0x0000000000000005 (STRTAB) 0x415bb8
    0x0000000000000006 (SYMTAB) 0x404410
    0x000000000000000a (STRSZ) 37850 (bytes)
    0x000000000000000b (SYMENT) 24 (bytes)
    0x0000000000000015 (DEBUG) 0x0
    0x0000000000000003 (PLTGOT) 0x7dcfe8
    0x0000000000000002 (PLTRELSZ) 8304 (bytes)
    0x0000000000000014 (PLTREL) RELA
    0x0000000000000017 (JMPREL) 0x4209c0
    0x0000000000000007 (RELA) 0x4207e0
    0x0000000000000008 (RELASZ) 480 (bytes)
    0x0000000000000009 (RELAENT) 24 (bytes)
    0x000000006ffffffe (VERNEED) 0x4206e0
    0x000000006fffffff (VERNEEDNUM) 5
    0x000000006ffffff0 (VERSYM) 0x41ef92
    0x0000000000000000 (NULL) 0x0

  • [solved] vim build failed

    Hi
    I am trying to build vim because the version in the repo lacks a couple of options I need (x11...). The build fails without a clear error message, below are the last lines before the makepkg -s fails:
    patching file src/cleanlint.vim
    Reversed (or previously applied) patch detected! Skipping patch.
    1 out of 1 hunk ignored -- saving rejects to file src/cleanlint.vim.rej
    patching file src/diff.c
    patching file src/edit.c
    patching file src/ex_cmds.c
    patching file src/ex_cmds2.c
    patching file src/ex_docmd.c
    patching file src/proto/ex_cmds.pro
    patching file src/proto/spell.pro
    patching file src/quickfix.c
    patching file src/spell.c
    patching file src/structs.h
    patching file src/term.h
    patching file src/vim.h
    patching file src/version.c
    ==> ERROR: Build Failed.
    Aborting...
    If the reason is the failed patch is there a way to correct things manually?
    This it the (slightly modified) PKGBUILD I am using:
    # $Id: PKGBUILD 53395 2009-09-30 20:20:00Z francois $
    # Maintainer: tobias [ tobias at archlinux org ]
    pkgname=vim
    _srcver=7.2
    _patchlevel=267
    pkgver=${_srcver}.${_patchlevel}
    pkgrel=1
    pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor'
    arch=(i686 x86_64)
    license=('custom:vim')
    url="http://www.vim.org"
    depends=('gpm' 'coreutils')
    makedepends=('wget' 'sed' 'grep' 'gettext' 'perl')
    optdepends=('perl: the runtime provides a view useful perl scripts')
    backup=(etc/vimrc)
    install=${pkgname}.install
    # we need the extra-stuff to get all patches applied smoothly
    source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
    ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
    ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
    fetch_patches.sh fetch_runtime.sh vimrc archlinux.vim)
    md5sums=('f0901284b338e448bfd79ccca0041254' '35e04482f07c57221c9a751aaa3b8dac' \
    'd8884786979e0e520c112faf2e176f05' '6d7e8d7868e8bfaa9a5880cd9c439320' \
    '45c1c3c6aff7de0d8fc2a9d8cd5cec7d' '29125bedc96f2a58c772ee0455a333bc' \
    '10353a61aadc3f276692d0e17db1478e')
    build()
    _versiondir="vim"$(echo ${_srcver} | sed "s/\.//")
    # pull in patches from vim.org (or the src cache alternatively)
    . ${srcdir}/fetch_patches.sh
    . ${srcdir}/fetch_runtime.sh
    get_patches || return 1
    cd ${srcdir}/${_versiondir}
    sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
    sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h
    # build party
    ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
    --with-compiledby=Arian --with-features=huge \
    --enable-gpm --enable-acl --with-x=yes \
    --enable-multibyte --enable-cscope \
    --enable-perlinterp --enable-pythoninterpr \
    --enable-fontset
    #--with-global-runtime=/usr/share/vim --with-vim-name=vim \
    make || return 1
    make VIMRCLOC=/etc DESTDIR=${pkgdir} install
    cd ${pkgdir}/usr/bin
    rm ex view # provided by (n)vi in core
    mv vim vim-normal # we create a vim-symlink on post_install
    ln -sf vim-normal vim
    # ... make g* related symlinks point directly to the actual binary
    ln -sf vim-normal rview
    ln -sf vim-normal rvim
    ln -sf vim-normal vimdiff
    # delete some manpages
    find ${pkgdir}/usr/share/man -type d -name 'man1' 2> /dev/null | \
    while read mandir; do
    cd ${mandir}
    rm -f ex.1 view.1 # provided by (n)vi
    rm -f evim.1 # this does not make sense in the console version
    done
    _runtimedir="${pkgdir}/usr/share/vim/${_versiondir}/"
    update_runtime
    cd ${srcdir}/${_versiondir}
    install -Dm644 ${srcdir}/vimrc ${pkgdir}/etc/vimrc
    install -Dm644 ${srcdir}/archlinux.vim \
    ${pkgdir}/usr/share/vim/vimfiles/archlinux.vim
    install -dm755 ${pkgdir}/usr/share/licenses/vim
    cd ${pkgdir}/usr/share/licenses/vim
    ln -s ../../vim/${_versiondir}/doc/uganda.txt license.txt
    Any help appreciated.
    Last edited by akuschki (2009-10-22 16:43:34)

    thanks, that solved it. Sorry I didn't try that obvious solution myself, I didn't realise that installing gvim would also change the features of the console vim version. I thought those two packages are independent.
    Cheers

  • [self-SOLVED]vim + lilypond syntax highlighting

    I'm trying to get vim to use syntax highlighting in lilypond files. Apparently lilypond comes with the necessary files, but I have not been able to make vim find them (?). I am not very experienced with vi(m), so there might be something wrong with my setup.
    I have, of course, both vim and lilypond installed. The files for lilypond syntax highlighting are in subdirectories of /usr/share/lilypond/2.12.3/vim/. Vim syntax highlighting works for other files, such as C++, HTML, etc., so no problem there. My ~/.vimrc file contains
    set runtimepath+=/usr/share/lilypond/2.12.3/vim/
    as per instruction given in http://lilypond.org/doc/v2.12/Documenta … m/Vim-mode (and the path is correctly modified). But when I open a lilypond file (with the correct .ly suffix) all I get is black and white. What's the problem?
    [EDIT: Oh heck, nevermind! Apparently I was getting too tired to read instructions properly. Was missing the ~/.vim/filetype.vim file described in the above link.]
    Last edited by lotuskip (2010-04-12 18:33:42)

    You're right about it being overridden.  This change should be able to be placed in ~/.vimrc though.
    Well  that was foolish - I should have read the comments right below in that file.  It says exactly how to set it in vimrc.  I've now added the following to my ~/.vimrc and this is completely solved without modifying the /usr/... file.
    let g:tex_flavor = "tex"
    Last edited by Trilby (2013-03-29 16:11:26)

  • [Solved] Vim ignoring modelines

    This line is at the end of a load of my bash scripts, but none of the settings are getting applied (for the several files I've tried).
    It's the last line in my file.
    # vim:set ts=4 sw=4 ft=sh et:
    I've got no modeline setting in my vimrc, so no idea why it's being ignored unless there's one. I've read though the vim help and have done a quick internet search, but can't find anything obvious.
    Any ideas?
    Last edited by skanky (2012-07-11 09:32:43)

    JackH79 wrote:
    I think the expandoption shouldn't have a colon. What happens if you try:
    # vim: ts=4 sw=4 ft=sh et
    That doesn't change behaviour, and  I think it goes against what the help says.
    However, it looks like the issue is elsewhere, as looking at the settings, the modeline isn't getting ignored, it's the behaviour isn't as I expect from those settings. This could be user error, but whatever it is, it isn't modelines getting ignored. So I'll mark this as solved and look into the behaviour issue.
    Many thanks for your replies.

  • [solved] vim

    So I already have gvim so vi seems a bit redundant. I'd rather build my own package and have vi be a symlink to vim. vi is a base package, though. Is there any reason not to do this?
    Last edited by AaronBP (2012-08-19 21:10:44)

    Awebb wrote:I have a symlink in /usr/local/bin/vi pointing to /usr/bin/vim. If you really need to make the package, make sure you solve the conflict with the vi package in the PKGBUILD.
    You know, that sounds like a much better idea than trying to maintain my own version of Arch's crazy vim package. Thanks!

  • [SOLVED] vim: newlines when pasting block selection

    Hi there!
    When pasting a block selection im Vim, the pasted lines are added to the existing lines. That definitely has it's uses, but usually I'd like to paste the lines onto blank lines. For this, I first have to generate a buch of empty lines, and only then can I paste the block. Is there a way to automatically generate new lines when pasting blocks?
    Here's a small example in Fortran. I'd like to get the list of REALs by block-selecting the variables and copying them between the REAL and the INTEGER block.
    REAL :: &
    real1 (2,2) , &
    real2 (5,2) , &
    real3 (1,2)
    INTEGER :: &
    int1 ,&
    int2
    If I just block-select it and paste it onto the line between the REAL and INTEGER blocks, I end up with this:
    REAL :: &
    real1 (2,2) , &
    real2 (5,2) , &
    real3 (1,2)
    real1
    real2INTEGER :: &
    real3 int1 ,&
    int2
    What I'd like to end up with, though, is this:
    REAL :: &
    real1 (2,2) , &
    real2 (5,2) , &
    real3 (1,2)
    real1
    real2
    real3
    INTEGER :: &
    int1 ,&
    int2
    Without manually inserting blank lines, that is!
    PS: I'm not really sure whether that's the correct subforum, but as the questions mostly addresses Programmers/Coders, I guess it should be fine here.
    Last edited by cryptkeeper (2013-11-07 08:16:32)

    karol wrote:http://vim.wikia.com/wiki/Unconditional … wise_paste
    '\cp' seems to do what you want.
    I haven't tried it yet, but it looks exactly what I need! What I do after pasting the selected block is often joining the lines to a single line with the variables delimited by commas or \\|| (for further use in vim regexes), and it looks like this plugin can do exactly this.
    Thanks! I'll mark it SOLVED then (and hope I'll get around to actually try it soon enough).
    Trilby wrote:Karol's answer seems like a more direct solution, but I'd personally go with a combination of simpler commands like "3yy3jPw Ctrl-v 3j$d"
    The problem with this is that you know the exact number of lines, i.e. 3 in this case, which is usually not the case in the code I work with as the variable lists are much longer.
    But what I've become accustomed to in the meantime is memorizing the number of lines that vim shows when I yank the block and inserting that number of new lines before pasting, e.g. for a 24 line block
    24o<ESC>j
    24k
    p
    I doubt that using 24o<ESC>j is the best way to insert the 24 blank lines, but it works well enough.

  • [Solved] ViM colors

    How do I have a ViM colorscheme inherit the background colour that is prescribed in Xresources?---Ideally there would be a command like
    hi Normal ctermfg=$XFGLOL ctermbg=$XBG_LOL
    Last edited by tomgg (2013-12-24 03:40:46)

    Glad that worked, please remember to mark the thread as [SOLVED] by clicking "edit" on the first post.

Maybe you are looking for

  • ITunes Match weird glitches on my iPhone 5

    Hello Community. I'm having a weird problem with iTunes Match, pmart playlists, and songs downloaded to my iPhone. I have used smart playlist on both my Mac and iPhone for as long as I can remember and havent incountered any significant issues until

  • TS3367 Can't get sound on face time

    Can't hear the other person I'm talking to on face time

  • FI/AR:Bulk processing of UK cheques

    LS, our relation is processing customer payment using UK cheques. This process involves customers sending paper cheques, which ned to be matched with the outstanding balance of the customer. In the first step the paper cheques need to be posted to a

  • I was updating my iphone 4 and an error occurred and now i can't restore my iphone

    I was updating my iphone 4 and an error occurred and now i can't restore my iphone and it wont show up in my itunes or on my computer

  • Fan Speed will not adjust/Too Noisy

    I just installed my new MSI R6670 card.  This card was reviewed as being very quiet but I immediately thought just the opposite.  It sounds like the fans are running at 100% all the time overwhelming the sound of all other fans in my system. The CD c