Loading ...
Sorry, an error occurred while loading the content.

139247Ultisnips is not working with vim-latex

Expand Messages
  • rudrab
    Sep 20, 2013
    • 0 Attachment
      Hi Friends,
      I am using Ultisnips 2.2 and vim-latex from pathogen.

      vim-latex defines some tab expansions like:
      SSE-> \section{}<++>
      with CTRL+J will move the cursor to <++> in insert mode.

      But as soon as I put Ultisnips 2.2 inside the bundle, this is nomore working, i.e. CTRL+J is not going to <++> placeholders defined inside the vim-latex.

      But CTRL+J is still working for the placeholders used from Ultisnips directory.

      pasted below is my complete .vimrc.
      Kindly help.

      "General Settings
      set autoindent
      set smartindent
      set incsearch
      set ignorecase
      set smartcase
      set novisualbell
      set nocompatible
      "set paste
      set ruler
      set nu
      set colorcolumn=100
      set sw=2
      set iskeyword+=:
      set lines=42 columns=140
      "Pathogen
      call pathogen#infect()
      set hidden

      "Apperaence
      filetype on
      filetype plugin on
      filetype indent on
      syntax on
      colorscheme MySlate

      "Set Spell
      set spell spl=en_us
      set spell


      "======================
      "PROGRAM SPECIFIC STAFFS
      " Fortran stuff
      :let fortran_do_enddo=1
      :let fortran_more_precise=1
      :let fortran_free_source=1
      :let fortran_have_tabs=1
      ":nnoremap <Leader>lf :up!<cr>:! ifort %<cr>
      au FileType fortran nnoremap <buffer> <Leader>lm :up!<cr>:! ifort %<cr>
      au FileType tex nnoremap <buffer> <Leader>lm :up!<cr>:! latexmk -pdf %<cr>

      "latex only
      let g:tex_flavor='latex'
      " Always jump to last edited line
      if has("autocmd")
      au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
      \| exe "normal! g'\"" | endif
      endif
      :nnoremap <Leader>lw :up!<cr>:call Tex_RunLaTeX()<cr>

      "mallard
      au BufNewFile,BufRead *.page set ft=mallard
      au BufNewFile,BufRead *.page so /usr/share/vim/vim73/indent/xml.vim

      "html
      autocmd FileType html set omnifunc=htmlcomplete#CompleteTags



      "============================
      "Plugins settings
      "NerdTree/Project
      nnoremap <C-n> :NERDtree<CR>
      nnoremap <C-q> :Project<CR>
      let g:proj_window_width=24

      "Move between split windows
      nmap <silent> <A-Up> :wincmd k<CR>
      nmap <silent> <A-Down> :wincmd j<CR>
      nmap <silent> <A-Left> :wincmd h<CR>
      nmap <silent> <A-Right> :wincmd l<CR>

      "minibuffexplorer
      map <Leader>e :MBEOpen<cr>
      map <Leader>c :MBEClose<cr>
      map <Leader>t :MBEToggle<cr>


      "ultisnippets
      let g:UltiSnipsEditSplit='vertical'
      let g:UltiSnipsSnippetsDir="${HOME}/.vim/MySnipDir"
      let g:UltiSnips = {}
      let g:UltiSnips.always_use_first_snippet = 1
      let g:UltiSnips.ExpandTrigger = "<tab>"
      let g:UltiSnips.JumpForwardTrigger = "<tab>"
      let g:UltiSnips.JumpBackwardTrigger = "<c-k>"

      "Use TAB to complete when typing words, else inserts TABs as usual.
      "Uses dictionary and source files to find matching words to complete.

      "See help completion for source,
      "Note: usual completion is on <C-n> but more trouble to press all the time.
      "Never type the same word twice and maybe learn a new spellings!
      "Use the Linux dictionary when spelling is in doubt.
      "Window users can copy the file to their machine.
      function! Tab_Or_Complete()
      if col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^\w'
      return "\<C-N>"
      else
      return "\<Tab>"
      endif
      endfunction
      :inoremap <Tab> <C-R>=Tab_Or_Complete()<CR>
      :set dictionary="/usr/share/dict/words"

      nnoremap <F12> :bn<CR>

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 3 messages in this topic