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

make.vim indent file

Expand Messages
  • Sung-Hyun Nam
    Hello, I made a make.vim indent file. Just copy it to ~/.vim/indent and do :filetype indent on . regards, namsh Vim indent file Language: Makefile
    Message 1 of 1 , Sep 3, 2000
    • 0 Attachment
      Hello,

      I made a make.vim indent file.
      Just copy it to ~/.vim/indent and do :filetype indent on'.

      regards,

      namsh

      " Vim indent file
      " Language: Makefile
      " Maintainer: Sung-Hyun Nam <namsh@...>
      " Last Change: 2000/09/04

      setlocal indentexpr=GetMakeIndent()

      " Only define the function once.
      if exists("*GetMakeIndent")
      finish
      endif

      function GetMakeIndent()
      if v:lnum == 1
      return 0
      endif
      let ind = indent(v:lnum - 1)
      if getline(v:lnum - 1) =~ '^\S\+.*:'
      let ind = ind + &sw
      endif
      return ind
      endfunction
    Your message has been successfully submitted and would be delivered to recipients shortly.