       file = file.replace(/(\r\n|\n|\r)/gm, ' ')
       includepaths = "#{includepaths} #{file}"
 
-    split = includepaths.split " "
+    #split = includepaths.split " "
+    # split the include paths, taking care of quotes
+    regex = /[^\s"]+|"([^"]*)"/gi
+    includepathsSplit = []
 
-    # concat includepath
-    for custompath in split
+    loop
+      match = regex.exec includepaths
+      if match
+        includepathsSplit.push(if match[1] then match[1] else match[0])
+      else
+        break
+
+    # add includepaths
+    for custompath in includepathsSplit
       if custompath.length > 0
-        @cmd = "#{@cmd} -I #{custompath}"
+        # @cmd = "#{@cmd} -I #{custompath}"
         # if the path is relative, resolve it
         # TODO: if path contain blank space!!!
-        # custompathResolved = path.resolve(atom.project.getPaths()[0], custompath)
-        # @cmd = "#{@cmd} -I \"#{custompathResolved}\""
-        # custompathResolved = custompathResolved.replace(/\ /g, '\\ ')
-        # @cmd = "#{@cmd} -I #{custompathResolved}"
-
-    if atom.config.get 'linter-clang.clangSuppressWarnings'
-      @cmd = "#{@cmd} -w"
-    # build the command with arguments to lint the file
-    {command, args} = @getCmdAndArgs(filePath)
+        custompathResolved = path.resolve(atom.project.getPaths()[0], custompath)
+        args.push '-I'
+        args.push custompathResolved
 
     # add file to regex to filter output to this file,
     # need to change filename a bit to fit into regex


  # A string, list, tuple or callable that returns a string, list or tuple,
  # containing the command line (with arguments) used to lint.
  cmd: '-fsyntax-only -fno-caret-diagnostics -fexceptions'
  isCpp: false
  clang: null

  executablePath: null


  fileName: ''

  lintFile: (filePath, callback) ->
    @cmd = 'clang -fsyntax-only -fno-caret-diagnostics -fexceptions'

    {command, args} = @getCmdAndArgs(filePath)
    @fileName = args[3]
    args[3] = ''

    command = @clang = atom.config.get 'linter-clang.clangCommand'
    if atom.inDevMode()
      console.log 'clang-command: ' + @clang

    args.push '-x'
    args.push @language
    args.push @flag

    if @isCpp
      # TODO: loop flags separate from blank space
      args.push atom.config.get 'linter-clang.clangDefaultCppFlags'
    else
      args.push atom.config.get 'linter-clang.clangDefaultCFlags'

    args.push "-ferror-limit=#{atom.config.get 'linter-clang.clangErrorLimit'}"
    args.push '-w' if atom.config.get 'linter-clang.clangSuppressWarnings'

    if atom.config.get 'linter-clang.clangCompleteFile'
      args.push ClangFlags.getClangFlags(@editor.getPath()).join

    includepaths = atom.config.get 'linter-clang.clangIncludePaths'

